Release the lock and return if an event entry fails to get allocated.
Signed-off-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
elem = (POVS_EVENT_QUEUE_ELEM)OvsAllocateMemoryWithTag(
sizeof(*elem), OVS_EVENT_POOL_TAG);
+
+ if (elem == NULL) {
+ OVS_LOG_WARN("Fail to allocate memory for event");
+ OvsReleaseEventQueueLock();
+ return;
+ }
+
RtlCopyMemory(&elem->event, event, sizeof elem->event);
InsertTailList(&queue->elemList, &elem->link);
queue->numElems++;