[syslinux] [PATCH 1/1] COM32/opendir: free for malloc
Gene Cumm
gene.cumm at gmail.com
Wed Mar 4 17:33:20 PST 2009
From: Gene Cumm <gene.cumm at gmail.com>
COM32/opendir: free for malloc
Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
---
Matching the malloc with a free.
diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c
index 7063f8c..5129273 100644
--- a/com32/lib/opendir.c
+++ b/com32/lib/opendir.c
@@ -50,6 +50,8 @@ DIR *opendir(const char *pathname)
/* ENOTDIR is another but a file must exist */
errno = ENOENT;
}
+ if (pathname != tpath)
+ free(tpath);
/* We're done */
return newdir;
More information about the Syslinux
mailing list