diff options
author | Karel Zak | 2012-01-17 17:16:57 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-17 17:16:57 +0100 |
commit | 0208ae2e0c9f212914f4400078918a6c5df2e2d4 (patch) | |
tree | 9c918543fdeae2e771564e9fc517910cf4b28f84 /libmount | |
parent | build-sys: use $(MAKE) for checksmatch (diff) | |
download | kernel-qcow2-util-linux-0208ae2e0c9f212914f4400078918a6c5df2e2d4.tar.gz kernel-qcow2-util-linux-0208ae2e0c9f212914f4400078918a6c5df2e2d4.tar.xz kernel-qcow2-util-linux-0208ae2e0c9f212914f4400078918a6c5df2e2d4.zip |
libmount: fix bugs detected by [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount')
-rw-r--r-- | libmount/src/context_mount.c | 2 | ||||
-rw-r--r-- | libmount/src/utils.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 9d5933c56..17bbd4287 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -243,7 +243,7 @@ static int evaluate_permissions(struct libmnt_context *cxt) cxt->user_mountflags |= MNT_MS_USER; - if (!cache && xsrc) + if (!cache) free(xsrc); } diff --git a/libmount/src/utils.c b/libmount/src/utils.c index cbaabc6c4..c4f5f9910 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -59,7 +59,7 @@ int mnt_parse_offset(const char *str, size_t len, uintmax_t *res) char *p; int rc = 0; - if (!str && !*str) + if (!str || !*str) return -EINVAL; p = strndup(str, len); |