summaryrefslogtreecommitdiff
path: root/source3/libmsrpc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libmsrpc')
-rw-r--r--source3/libmsrpc/libmsrpc_internal.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libmsrpc/libmsrpc_internal.c b/source3/libmsrpc/libmsrpc_internal.c
index 3cb702e376..a06915b72c 100644
--- a/source3/libmsrpc/libmsrpc_internal.c
+++ b/source3/libmsrpc/libmsrpc_internal.c
@@ -713,9 +713,13 @@ CacService *cac_MakeServiceArray( TALLOC_CTX * mem_ctx,
if ( !mem_ctx || !svc )
return NULL;
- services = TALLOC_ZERO_ARRAY( mem_ctx, CacService, num_services );
- if ( !services )
- return NULL;
+ if (num_services) {
+ services = TALLOC_ZERO_ARRAY( mem_ctx, CacService, num_services );
+ if ( !services )
+ return NULL;
+ } else {
+ services = NULL;
+ }
for ( i = 0; i < num_services; i++ ) {
services[i].service_name =