]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: don't free() uninitialized variable
authorKarel Zak <kzak@redhat.com>
Wed, 8 Jun 2011 10:16:08 +0000 (12:16 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 8 Jun 2011 10:16:08 +0000 (12:16 +0200)
blkid.c: In function ‘main’:
blkid.c:656:6: warning: ‘res’ may be used uninitialized in this function [-Wuninitialized]
blkid.c:623:9: note: ‘res’ was declared here

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/blkid.c

index 51599f52e72e41b99af7d5d199d9308aad8f4210..35b3cd4b9647b4135794dff5d8b3c72107e4c203 100644 (file)
@@ -620,7 +620,7 @@ static char **list_to_types(const char *list, int *flag)
 {
        int i;
        const char *p = list;
-       char **res;
+       char **res = NULL;
 
        if (p && strncmp(p, "no", 2) == 0) {
                *flag = BLKID_FLTR_NOTIN;