mirror of https://github.com/vitalif/e2fsprogs
Fix memory leak in blkid library
Addresses Debian Bug: #413661 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>bitmap-optimize
parent
a178852877
commit
257ace82b7
|
@ -1,3 +1,8 @@
|
|||
2007-03-06 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* devname.c (dm_probe_all), probe.c (blkid_verify): Fix memory
|
||||
leak. (Addresses Debian Bug #413661)
|
||||
|
||||
2006-09-24 Theodore Tso <tytso@mit.edu>
|
||||
|
||||
* devno.c (scan_dir): Don't follow symlinks when recursively
|
||||
|
|
|
@ -305,6 +305,7 @@ static void dm_probe_all(blkid_cache cache, int only_if_new)
|
|||
probe_one(cache, device, dev, BLKID_PRI_DM, only_if_new);
|
||||
|
||||
try_next:
|
||||
free(device);
|
||||
next = names->next;
|
||||
} while (next);
|
||||
|
||||
|
|
|
@ -886,9 +886,9 @@ try_again:
|
|||
}
|
||||
|
||||
if (!dev->bid_type) {
|
||||
if (probe.fd >= 0) close(probe.fd);
|
||||
blkid_free_dev(dev);
|
||||
return NULL;
|
||||
dev = 0;
|
||||
goto found_type;
|
||||
}
|
||||
|
||||
found_type:
|
||||
|
@ -908,7 +908,8 @@ found_type:
|
|||
free(probe.sbbuf);
|
||||
if (probe.buf)
|
||||
free(probe.buf);
|
||||
close(probe.fd);
|
||||
if (probe.fd >= 0)
|
||||
close(probe.fd);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue