test: Fix two memory leaks

PR-URL: https://github.com/libuv/libuv/pull/470
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Karl Skomski 2015-08-05 12:45:50 +02:00 committed by Saúl Ibarra Corretgé
parent 3869f2a8c0
commit c2e6f3bad1
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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);