]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mount/mtab.cc: memory leaks 6905/head
authorqiankunzheng <zheng.qiankun@h3c.com>
Sun, 13 Dec 2015 01:03:22 +0000 (20:03 -0500)
committerqiankunzheng <zheng.qiankun@h3c.com>
Sun, 13 Dec 2015 01:03:33 +0000 (20:03 -0500)
the free() should be called to free resources, in order to avoid memory leaks

Fixes:#14066
Signed-off-by: Qiankun Zheng <zheng.qiankun@h3c.com>
src/mount/mtab.c

index d17f7a55f6cd8819f9adb97098ce94e8840b6808..4dc82bb34faa22bc1cfbfbaa78a0829a4d50cfcf 100644 (file)
@@ -289,4 +289,6 @@ update_mtab_entry(const char *spec, const char *node, const char *type,
 
        free(mnt.mnt_fsname);
        free(mnt.mnt_dir);
+       free(mnt.mnt_type);
+       free(mnt.mnt_opts);
 }