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
(parent:
c4381db
)
filesystems: Fix memory leak found by valgrind.
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 24 Nov 2011 15:49:27 +0000
(15:49 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Thu, 24 Nov 2011 15:51:16 +0000
(15:51 +0000)
cat/virt-filesystems.c
patch
|
blob
|
history
diff --git
a/cat/virt-filesystems.c
b/cat/virt-filesystems.c
index
de7a243
..
ac6466f
100644
(file)
--- a/
cat/virt-filesystems.c
+++ b/
cat/virt-filesystems.c
@@
-449,7
+449,7
@@
do_output_filesystems (void)
/* Skip swap and unknown, unless --extra flag was given. */
if (!(output & OUTPUT_FILESYSTEMS_EXTRA) &&
(STREQ (fses[i+1], "swap") || STREQ (fses[i+1], "unknown")))
-
continue
;
+
goto next
;
dev = canonical_device (fses[i]);
@@
-492,6
+492,8
@@
do_output_filesystems (void)
free (dev);
free (vfs_label);
free (vfs_uuid);
+
+ next:
free (fses[i]);
free (fses[i+1]);
}