From: Noel Power Date: Mon, 17 Oct 2022 09:17:34 +0000 (+0100) Subject: s3/param: Check return of talloc_strdup X-Git-Tag: talloc-2.4.0~715 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19eb88bc53e481327bbd437b0c145d5765c6dcec;p=thirdparty%2Fsamba.git s3/param: Check return of talloc_strdup followup to commit ff003fc87b8164610dfd6572347c05308c4b2fd7 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15205 Signed-off-by: Noel Power Reviewed-by: Jeremy Allison --- diff --git a/source3/param/test_lp_load.c b/source3/param/test_lp_load.c index 03be4118efd..9f3d5516805 100644 --- 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(); }