Add a talloc failure check
authorVolker Lendecke <vl@samba.org>
Tue, 6 Jan 2009 22:25:41 +0000 (23:25 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 6 Jan 2009 22:27:24 +0000 (23:27 +0100)
source4/rpc_server/epmapper/rpc_epmapper.c

index 5491bd242a5cb169347aea4e476f1c8f4aa1d637..b9b02962be79add20218a936e20c45ed9cf628c8 100644 (file)
@@ -179,6 +179,9 @@ static error_status_t dcesrv_epm_Map(struct dcesrv_call_state *dce_call, TALLOC_
 
        ZERO_STRUCT(*r->out.entry_handle);
        r->out.num_towers = talloc(mem_ctx, uint32_t);
+       if (!r->out.num_towers) {
+               return EPMAPPER_STATUS_NO_MEMORY;
+       }
        *r->out.num_towers = 1;
        r->out.towers = talloc(mem_ctx, struct epm_twr_p_t);
        if (!r->out.towers) {