diff options
author | наб <[email protected]> | 2022-03-08 22:50:45 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-04-01 17:55:24 -0700 |
commit | a3dcc0aa0c0b7873265d0b014ea6133bd8e40591 (patch) | |
tree | b8b9c716de42c23fa0554362ad76dfadf1677f0a /cmd/zpool | |
parent | 84a3eab6aa44dedaec6d3f5e6da9ccb4b9942907 (diff) |
zfs, zpool: safe_malloc() duplicate argv
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #13259
Diffstat (limited to 'cmd/zpool')
-rw-r--r-- | cmd/zpool/zpool_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 5d1cae3e9..043b6a226 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -10924,7 +10924,7 @@ main(int argc, char **argv) * Many commands modify input strings for string parsing reasons. * We create a copy to protect the original argv. */ - newargv = malloc((argc + 1) * sizeof (newargv[0])); + newargv = safe_malloc((argc + 1) * sizeof (newargv[0])); for (i = 0; i < argc; i++) newargv[i] = strdup(argv[i]); newargv[argc] = NULL; |