git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3f903f0
)
daemon/readdir: avoid a small leak
author
Jim Meyering
<meyering@redhat.com>
Fri, 3 Jul 2009 09:52:19 +0000
(11:52 +0200)
committer
Jim Meyering
<meyering@redhat.com>
Fri, 3 Jul 2009 15:04:21 +0000
(17:04 +0200)
* daemon/readdir.c (do_readdir): Free both p and v.name, in case
only one of the allocations failed.
daemon/readdir.c
patch
|
blob
|
history
diff --git
a/daemon/readdir.c
b/daemon/readdir.c
index
cea6fdd
..
38bc66e
100644
(file)
--- a/
daemon/readdir.c
+++ b/
daemon/readdir.c
@@
-68,6
+68,8
@@
do_readdir (char *path)
if (!p || !v.name) {
reply_with_perror ("allocate");
free (ret->guestfs_int_dirent_list_val);
+ free (p);
+ free (v.name);
free (ret);
closedir (dir);
return NULL;