Addresses Debian Bug: #413661
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+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
probe_one(cache, device, dev, BLKID_PRI_DM, only_if_new);
try_next:
+ free(device);
next = names->next;
} while (next);
}
if (!dev->bid_type) {
- if (probe.fd >= 0) close(probe.fd);
blkid_free_dev(dev);
- return NULL;
+ dev = 0;
+ goto found_type;
}
found_type:
free(probe.sbbuf);
if (probe.buf)
free(probe.buf);
- close(probe.fd);
+ if (probe.fd >= 0)
+ close(probe.fd);
return dev;
}