]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Add missing memory allocation fail check in cli_openx_create().
authorJeremy Allison <jra@samba.org>
Wed, 7 Sep 2022 19:50:25 +0000 (12:50 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 15 Sep 2022 18:43:32 +0000 (18:43 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/libsmb/clifile.c

index 86a6b58a6eddb836d0b4cfd16c3ed5a74ee4bf2c..11d919a51bf1669ab813649415a117723f12cb1b 100644 (file)
@@ -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);