diff options
author | Karel Zak | 2015-08-05 12:46:56 +0200 |
---|---|---|
committer | Karel Zak | 2015-08-05 12:46:56 +0200 |
commit | 941c734c569fe2aac20e45c75fdc63165e69413d (patch) | |
tree | 83613d54dd88ceb9db44f066ef6afd4743e5ad5d | |
parent | cfdisk, sfdisk: remove unused variables (diff) | |
download | kernel-qcow2-util-linux-941c734c569fe2aac20e45c75fdc63165e69413d.tar.gz kernel-qcow2-util-linux-941c734c569fe2aac20e45c75fdc63165e69413d.tar.xz kernel-qcow2-util-linux-941c734c569fe2aac20e45c75fdc63165e69413d.zip |
libmount: variable dereferenced before check [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | libmount/src/optstr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index a729695f1..6593c1abe 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -247,13 +247,14 @@ int mnt_optstr_append_option(char **optstr, const char *name, const char *value) int mnt_optstr_prepend_option(char **optstr, const char *name, const char *value) { int rc = 0; - char *tmp = *optstr; + char *tmp; if (!optstr) return -EINVAL; if (!name || !*name) return 0; + *tmp = *optstr; *optstr = NULL; rc = mnt_optstr_append_option(optstr, name, value); |