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 <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12015
This commit is contained in:
parent
dd00925e8d
commit
5d1a32a542
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue