STEP01x: pidl: check for dcerpc_call_handle_get_pipes_struct() return NULL in s3compa...
authorGünther Deschner <gd@samba.org>
Thu, 6 Aug 2015 14:36:32 +0000 (16:36 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Jun 2019 10:58:04 +0000 (12:58 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
pidl/lib/Parse/Pidl/Samba3/CompatServer.pm

index b6bc7e6b2b68b005369a860b86d7bcade86a988c..f6df2693e2e752ff0e2aa665fe099baa3bee8f5d 100644 (file)
@@ -79,6 +79,12 @@ sub ParseFunctionSend($$)
        pidl "";
 
        pidl "p = dcerpc_call_handle_get_pipes_struct(call);";
+       pidl "if (p == NULL) {";
+       indent;
+       pidl "tevent_req_nterror(req, NT_STATUS_NO_MEMORY);";
+       pidl "return tevent_req_post(req, ev);";
+       deindent;
+       pidl "}";
        pidl "";
 
        my ($s, $h) = CallWithStructExported("p", "r", $fn,