summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2022-10-17 10:27:31 +0100
committerJeremy Allison <jra@samba.org>2022-10-17 19:49:36 +0000
commit0326549a052c22e4929e3760fd5011c35e32fe33 (patch)
tree1796b116ab0793bafc528812e0f0df9a2a4f65aa
parent972127daddc7a32d23fb84d97102557035b06f5b (diff)
downloadsamba-0326549a052c22e4929e3760fd5011c35e32fe33.tar.gz
s3/utils: check result of talloc_strdup
follow to commit 4b15d8c2a5c8547b84e7926fed9890b5676b8bc3 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15205 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Oct 17 19:49:37 UTC 2022 on sn-devel-184
-rw-r--r--source3/utils/testparm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index c751c06dcc9..e0455b9d7b6 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -844,6 +844,11 @@ static void do_per_share_checks(int s)
if (poptPeekArg(pc)) {
config_file = talloc_strdup(frame, poptGetArg(pc));
+ if (config_file == NULL) {
+ DBG_ERR("out of memory\n");
+ TALLOC_FREE(frame);
+ exit(1);
+ }
} else {
config_file = get_dyn_CONFIGFILE();
}