From deff0e357121247062a418a27332f1060a0d191a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 10 Apr 2014 07:29:31 -0700 Subject: [PATCH] test: Close process handles when spawn fails This should avoid assertions tripping in debug mode. --- test/test-spawn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-spawn.c b/test/test-spawn.c index 61107344..48b8d260 100644 --- a/test/test-spawn.c +++ b/test/test-spawn.c @@ -171,6 +171,7 @@ TEST_IMPL(spawn_fails) { r = uv_spawn(uv_default_loop(), &process, &options); ASSERT(r == UV_ENOENT || r == UV_EACCES); ASSERT(0 == uv_is_active((uv_handle_t*) &process)); + uv_close((uv_handle_t*) &process, NULL); ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY();