diff options
author | Karel Zak | 2011-12-21 17:32:01 +0100 |
---|---|---|
committer | Karel Zak | 2011-12-21 17:32:01 +0100 |
commit | 7eac65fcf630271c18d32a6f0dfa9089a20c66b0 (patch) | |
tree | c29d9f7c907abc96c5a52f9406fdb029a3be49bc /libblkid/src/probe.c | |
parent | prlimit: use xalloc libs (diff) | |
download | kernel-qcow2-util-linux-7eac65fcf630271c18d32a6f0dfa9089a20c66b0.tar.gz kernel-qcow2-util-linux-7eac65fcf630271c18d32a6f0dfa9089a20c66b0.tar.xz kernel-qcow2-util-linux-7eac65fcf630271c18d32a6f0dfa9089a20c66b0.zip |
libblkid; fix memory leak in blkid_probe_get_wholedisk_probe()
Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/probe.c')
-rw-r--r-- | libblkid/src/probe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c index 27d9b272f..cb56c5afa 100644 --- a/libblkid/src/probe.c +++ b/libblkid/src/probe.c @@ -1341,6 +1341,9 @@ blkid_probe blkid_probe_get_wholedisk_probe(blkid_probe pr) DBG(DEBUG_LOWPROBE, printf("allocate a wholedisk probe\n")); pr->disk_probe = blkid_new_probe_from_filename(disk_path); + + free(disk_path); + if (!pr->disk_probe) return NULL; /* ENOMEM? */ } |