[Pkg-libvirt-commits] [libguestfs] 61/65: filearch: Fix memory leak.

Hilko Bengen bengen at moszumanska.debian.org
Tue Apr 21 12:11:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 49867a22babfed9d274294aabb1f93941793a7de
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Apr 16 09:09:03 2015 +0100

    filearch: Fix memory leak.
    
    Found by 'make check-valgrind'.
    
    This fixes commit 20acc1f124a3f3af365c27b7654bead5beb1ef4c.
---
 src/filearch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/filearch.c b/src/filearch.c
index df65c98..8fb1acf 100644
--- a/src/filearch.c
+++ b/src/filearch.c
@@ -115,7 +115,7 @@ magic_for_file (guestfs_h *g, const char *filename, bool *loading_ok,
   int flags;
   CLEANUP_MAGIC_T_FREE magic_t m = NULL;
   const char *line;
-  char *elf_arch;
+  CLEANUP_FREE char *elf_arch = NULL;
 
   flags = g->verbose ? MAGIC_DEBUG : 0;
   flags |= MAGIC_ERROR | MAGIC_RAW;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list