diff options
author | Karel Zak <kzak@redhat.com> | 2009-02-17 23:57:15 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2009-02-17 23:57:15 +0100 |
commit | deedaa30537d73c8fdfbc709746ea47ab25571bf (patch) | |
tree | 4f0f9bf6bea2837d6f4c4ef4736bd0a5edcb7df4 /libs | |
parent | 50a3029d8877425441e6615d3d72ec73aa2e2518 (diff) | |
download | util-linux-old-deedaa30537d73c8fdfbc709746ea47ab25571bf.tar.gz |
blkid: check calloc() return value
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libs')
-rw-r--r-- | libs/blkid/src/probe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/blkid/src/probe.c b/libs/blkid/src/probe.c index 5e699096..449ee819 100644 --- a/libs/blkid/src/probe.c +++ b/libs/blkid/src/probe.c @@ -324,6 +324,9 @@ int blkid_probe_filter_types(blkid_probe pr, int flag, char *names[]) else blkid_probe_reset_filter(pr); + if (!pr->fltr) + return -1; + for (i = 0; i < ARRAY_SIZE(idinfos); i++) { int has = 0; const struct blkid_idinfo *id = idinfos[i]; @@ -372,6 +375,9 @@ int blkid_probe_filter_usage(blkid_probe pr, int flag, int usage) else blkid_probe_reset_filter(pr); + if (!pr->fltr) + return -1; + for (i = 0; i < ARRAY_SIZE(idinfos); i++) { const struct blkid_idinfo *id = idinfos[i]; |