libmount: fix null-checking [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2016-10-04 16:33:09 +02:00
parent e12e917bad
commit 9e13b1c1c7
1 changed files with 1 additions and 1 deletions

View File

@ -1171,7 +1171,7 @@ done:
free(spec);
if (dev) {
*path = allocated ? dev : strdup(dev);
if (!path)
if (!*path)
return -ENOMEM;
return 0;
}