]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: fix null-checking [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 4 Oct 2016 14:33:09 +0000 (16:33 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Oct 2016 14:33:14 +0000 (16:33 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/utils.c

index aa4bc627e1e22e8efd8e4a954025dfff8301d46b..29f259ffefdd6e99c29ad358baa2b136bac4d2bd 100644 (file)
@@ -1171,7 +1171,7 @@ done:
        free(spec);
        if (dev) {
                *path = allocated ? dev : strdup(dev);
-               if (!path)
+               if (!*path)
                        return -ENOMEM;
                return 0;
        }