]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: fix use-after-free [coverity scan]
authorKarel Zak <kzak@redhat.com>
Mon, 30 Jan 2012 21:57:42 +0000 (22:57 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 30 Jan 2012 21:57:42 +0000 (22:57 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/read.c

index 97fd4b4a2404c730739a58dcee2dbdeed0dfb82e..b284ff004eb05a10c6381c06484153cfdfa7d149 100644 (file)
@@ -370,10 +370,12 @@ static int blkid_parse_line(blkid_cache cache, blkid_dev *dev_p, char *cp)
                DBG(DEBUG_READ,
                    printf("blkid: device %s has no TYPE\n",dev->bid_name));
                blkid_free_dev(dev);
+               goto done;
        }
 
        DBG(DEBUG_READ, blkid_debug_dump_dev(dev));
 
+done:
        return ret;
 }