Permalink
Browse files

test: fix memory leaks in fs_symlink test

  • Loading branch information...
1 parent d36e2f2 commit 8399cb1fc366b1e5184f8a4e65f4e67f60eea7a9 @bnoordhuis bnoordhuis committed Oct 1, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/test-fs.c
View
@@ -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);

0 comments on commit 8399cb1

Please sign in to comment.