Fixes:
* stupid bug, blkid_put_cache() does not deallocate the probe struct
* the cache->probe initialization in verify.c should be also more
robust
Reported-By: Jean-Pierre Demailly <Jean-Pierre.Demailly@ujf-grenoble.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
}
blkid_free_tag(tag);
}
- free(cache->bic_filename);
+ blkid_free_probe(cache->probe);
+
+ free(cache->bic_filename);
free(cache);
}
(unsigned long)st.st_mtime, (unsigned long)diff));
- if (!cache->probe)
+ if (!cache->probe) {
cache->probe = blkid_new_probe();
+ if (!cache->probe) {
+ blkid_free_dev(dev);
+ return NULL;
+ }
+ }
fd = open(dev->bid_name, O_RDONLY);
if (fd < 0) {