[coverity] 1543230 Missing unlock

This commit is contained in:
akallabeth 2024-04-11 13:26:15 +02:00 committed by Martin Fleisz
parent 6217076b47
commit 0c7537c840

View File

@ -102,7 +102,7 @@ void PubSub_AddEventTypes(wPubSub* pubSub, wEventType* events, size_t count)
new_size = pubSub->size * 2;
new_event = (wEventType*)realloc(pubSub->events, new_size * sizeof(wEventType));
if (!new_event)
return;
goto fail;
pubSub->size = new_size;
pubSub->events = new_event;
}
@ -110,6 +110,7 @@ void PubSub_AddEventTypes(wPubSub* pubSub, wEventType* events, size_t count)
CopyMemory(&pubSub->events[pubSub->count], events, count * sizeof(wEventType));
pubSub->count += count;
fail:
if (pubSub->synchronized)
PubSub_Unlock(pubSub);
}