mount: fix path leak

canonicalize_path() does not free/touch it's argument; no need to strdup()
here.

Coverity cid 39

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
Sage Weil 2011-08-21 14:00:56 -07:00
parent 2ebf14147f
commit ef80b0acf8

View File

@ -251,7 +251,7 @@ update_mtab_entry(const char *spec, const char *node, const char *type,
opts = "rw";
mnt.mnt_fsname = strdup(spec);
mnt.mnt_dir = canonicalize_path(strdup(node));
mnt.mnt_dir = canonicalize_path(node);
mnt.mnt_type = strdup(type);
mnt.mnt_opts = strdup(opts);
mnt.mnt_freq = freq;