summaryrefslogtreecommitdiffstats
path: root/libmount/src/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmount/src/fs.c')
-rw-r--r--libmount/src/fs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libmount/src/fs.c b/libmount/src/fs.c
index 23c873d54..ebdc44fb9 100644
--- a/libmount/src/fs.c
+++ b/libmount/src/fs.c
@@ -831,8 +831,12 @@ int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr)
if (rc)
return rc;
n = strdup(optstr);
- if (!n)
+ if (!n) {
+ free(u);
+ free(v);
+ free(f);
return -ENOMEM;
+ }
}
free(fs->fs_optstr);