]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: potential null derefence [smatch scan]
authorKarel Zak <kzak@redhat.com>
Mon, 12 Sep 2011 14:10:45 +0000 (16:10 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Sep 2011 14:10:45 +0000 (16:10 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/blkid.c

index b1fd385bbd034cd78bba5cea350d17f22ce18e7a..a850ac9bd69e1db3709c097c63e1bfc7e0cf3bc1 100644 (file)
@@ -824,10 +824,10 @@ int main(int argc, char **argv)
                        fprintf(stderr, "Failed to allocate device name array\n");
                        goto exit;
                }
-       }
 
-       while (optind < argc)
-               devices[numdev++] = argv[optind++];
+               while (optind < argc)
+                       devices[numdev++] = argv[optind++];
+       }
 
        if (version) {
                print_version(stdout);