From: Jeremy Allison Date: Wed, 7 Sep 2022 19:50:25 +0000 (-0700) Subject: s3: libsmb: Add missing memory allocation fail check in cli_openx_create(). X-Git-Tag: talloc-2.4.0~1041 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7749103b22f83f7193267e9593ae6610c04dedf;p=thirdparty%2Fsamba.git s3: libsmb: Add missing memory allocation fail check in cli_openx_create(). Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 86a6b58a6ed..11d919a51bf 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -3070,6 +3070,9 @@ struct tevent_req *cli_openx_create(TALLOC_CTX *mem_ctx, } bytes = talloc_array(state, uint8_t, 0); + if (tevent_req_nomem(bytes, req)) { + return tevent_req_post(req, ev); + } bytes = smb_bytes_push_str(bytes, smbXcli_conn_use_unicode(cli->conn), fname, strlen(fname)+1, NULL);