mirror of
https://github.com/ceph/ceph
synced 2025-02-18 16:37:41 +00:00
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:
parent
2ebf14147f
commit
ef80b0acf8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user