summaryrefslogtreecommitdiff
path: root/source3/utils/net_status.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_status.c')
-rw-r--r--source3/utils/net_status.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c
index d3b1bae276..d85bd27b16 100644
--- a/source3/utils/net_status.c
+++ b/source3/utils/net_status.c
@@ -130,6 +130,10 @@ static int collect_pid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf,
ids->num_entries += 1;
ids->entries = SMB_REALLOC_ARRAY(ids->entries, struct sessionid, ids->num_entries);
+ if (!ids->entries) {
+ ids->num_entries = 0;
+ return 0;
+ }
ids->entries[ids->num_entries-1] = sessionid;
return 0;