record: Fix undefined memcpy in RecordAClientStateChange
If we don't have any recording contexts just skip all this. Note this also skips a pointless trip through malloc(0)/free.
This commit is contained in:
parent
9155e0c7c6
commit
f44ac101c5
|
@ -2729,7 +2729,8 @@ RecordAClientStateChange(CallbackListPtr *pcbl, void *nulldata,
|
|||
case ClientStateRetained: /* client disconnected */
|
||||
|
||||
/* RecordDisableContext modifies contents of ppAllContexts. */
|
||||
numContextsCopy = numContexts;
|
||||
if (!(numContextsCopy = numContexts))
|
||||
break;
|
||||
ppAllContextsCopy = xallocarray(numContextsCopy,
|
||||
sizeof(RecordContextPtr));
|
||||
assert(ppAllContextsCopy);
|
||||
|
|
Loading…
Reference in New Issue