aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-05-10 10:56:53 +0200
committerBrian Behlendorf <[email protected]>2021-05-21 10:16:18 -0700
commit5d1a32a542125e5ed10ef97112a07da242357917 (patch)
tree8b4d2019c44630ec1caaf7729fae261ef6d5a21e /lib
parentdd00925e8de33ca490d29b7b30fc8d2a14ab4da3 (diff)
linux/libshare: smb: don't leak share name in smb_disable_share_one()
Fixes: 645fb9cc21 "Implemented sharing datasets via SMB using libshare" Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12015
Diffstat (limited to 'lib')
-rw-r--r--lib/libshare/os/linux/smb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libshare/os/linux/smb.c b/lib/libshare/os/linux/smb.c
index 45811ff26..9b18848e0 100644
--- a/lib/libshare/os/linux/smb.c
+++ b/lib/libshare/os/linux/smb.c
@@ -308,7 +308,7 @@ smb_disable_share_one(const char *sharename)
argv[2] = NET_CMD_ARG_HOST;
argv[3] = (char *)"usershare";
argv[4] = (char *)"delete";
- argv[5] = strdup(sharename);
+ argv[5] = (char *)sharename;
argv[6] = NULL;
rc = libzfs_run_process(argv[0], argv, 0);