From: Thomas Cort Date: Tue, 14 Jan 2014 03:22:25 +0000 (-0500) Subject: test24: fix memory leak. X-Git-Tag: v3.3.0~652 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/index.css?a=commitdiff_plain;h=aaafe4b435456ad648cb3e57ab2e03528a89d2a2;p=minix.git test24: fix memory leak. Local variable 'name' was allocated but not freed. Add the free(). Change-Id: I3d16486fc17bd40d54619d80e5b1fdfe96f1be26 --- diff --git a/test/test24.c b/test/test24.c index f20c3b983..0ade27ade 100644 --- a/test/test24.c +++ b/test/test24.c @@ -243,6 +243,7 @@ void test24b() if ((dep2 = readdir(dirp[2])) == DIRENT0) e(25); /* can't effect 2 */ if (strcmp(dep2->d_name, name) == 0) e(26); /* Must be next */ if (closedir(dirp[2]) != 0) e(27); + free(name); } void test24c()