From 8399cb1fc366b1e5184f8a4e65f4e67f60eea7a9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 1 Oct 2012 23:54:32 +0200 Subject: [PATCH] test: fix memory leaks in fs_symlink test --- test/test-fs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test-fs.c b/test/test-fs.c index a6ae9a77..ce242dd3 100644 --- a/test/test-fs.c +++ b/test/test-fs.c @@ -1280,6 +1280,8 @@ TEST_IMPL(fs_symlink) { r = uv_fs_symlink(loop, &req, "test_file_symlink", "test_file_symlink_symlink", 0, NULL); ASSERT(r != -1); + uv_fs_req_cleanup(&req); + r = uv_fs_readlink(loop, &req, "test_file_symlink_symlink", NULL); ASSERT(r != -1); ASSERT(strcmp(req.ptr, "test_file_symlink") == 0); @@ -1307,6 +1309,8 @@ TEST_IMPL(fs_symlink) { r = uv_fs_symlink(loop, &req, "test_file_symlink2", "test_file_symlink2_symlink", 0, NULL); ASSERT(r != -1); + uv_fs_req_cleanup(&req); + r = uv_fs_readlink(loop, &req, "test_file_symlink2_symlink", readlink_cb); ASSERT(r != -1); uv_run(loop);