From 4516e7bdcbec3fe38bb9f988f9fc9ba71589438e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 13 Mar 2010 16:59:26 +0100 Subject: [PATCH] Fixed a memory leak in the torture_get_user_home_dir test. --- tests/unittests/torture_misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unittests/torture_misc.c b/tests/unittests/torture_misc.c index bc0442c1..088052ec 100644 --- a/tests/unittests/torture_misc.c +++ b/tests/unittests/torture_misc.c @@ -15,8 +15,9 @@ START_TEST (torture_get_user_home_dir) pwd = getpwuid(getuid()); user = ssh_get_user_home_dir(); - ck_assert_str_eq(user, pwd->pw_dir); + + SAFE_FREE(user); } END_TEST