git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dcf8d7
)
s3/param: Check return of talloc_strdup
author
Noel Power
<noel.power@suse.com>
Mon, 17 Oct 2022 09:17:34 +0000
(10:17 +0100)
committer
Jeremy Allison
<jra@samba.org>
Mon, 17 Oct 2022 18:46:29 +0000
(18:46 +0000)
followup to commit
ff003fc87b8164610dfd6572347c05308c4b2fd7
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>
source3/param/test_lp_load.c
patch
|
blob
|
history
diff --git
a/source3/param/test_lp_load.c
b/source3/param/test_lp_load.c
index 03be4118efdce9fe59b7d4198066447b6f1f6699..9f3d55168055b913f7bea4f41dcad2ff588751f7 100644
(file)
--- a/
source3/param/test_lp_load.c
+++ b/
source3/param/test_lp_load.c
@@
-83,6
+83,11
@@
int main(int argc, const char **argv)
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();
}