summaryrefslogtreecommitdiffstats
path: root/libmount/src/optstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmount/src/optstr.c')
-rw-r--r--libmount/src/optstr.c3
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);