From c2e6f3bad1d1e508fa4ce09ba460b398557593d4 Mon Sep 17 00:00:00 2001 From: Karl Skomski Date: Wed, 5 Aug 2015 12:45:50 +0200 Subject: [PATCH] test: Fix two memory leaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/libuv/libuv/pull/470 Reviewed-By: Saúl Ibarra Corretgé --- test/test-signal-multiple-loops.c | 1 + test/test-spawn.c | 1 + 2 files changed, 2 insertions(+) diff --git a/test/test-signal-multiple-loops.c b/test/test-signal-multiple-loops.c index f8fef36e..15812991 100644 --- a/test/test-signal-multiple-loops.c +++ b/test/test-signal-multiple-loops.c @@ -185,6 +185,7 @@ static void loop_creating_worker(void* context) { ASSERT(r == 0); uv_loop_close(loop); + free(loop); increment_counter(&loop_creation_counter); } while (!stop); diff --git a/test/test-spawn.c b/test/test-spawn.c index f4e9ea65..e4ac391a 100644 --- a/test/test-spawn.c +++ b/test/test-spawn.c @@ -1401,6 +1401,7 @@ TEST_IMPL(spawn_fs_open) { fd = uv_fs_open(uv_default_loop(), &fs_req, "/dev/null", O_RDWR, 0, NULL); ASSERT(fd >= 0); + uv_fs_req_cleanup(&fs_req); init_process_options("spawn_helper8", exit_cb);