test24: fix memory leak.

Local variable 'name' was allocated but not freed. Add the free().

Change-Id: I3d16486fc17bd40d54619d80e5b1fdfe96f1be26
This commit is contained in:
Thomas Cort 2014-01-13 22:22:25 -05:00
parent 274fdff60c
commit aaafe4b435

View file

@ -243,6 +243,7 @@ void test24b()
if ((dep2 = readdir(dirp[2])) == DIRENT0) e(25); /* can't effect 2 */ 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 (strcmp(dep2->d_name, name) == 0) e(26); /* Must be next */
if (closedir(dirp[2]) != 0) e(27); if (closedir(dirp[2]) != 0) e(27);
free(name);
} }
void test24c() void test24c()