Error condition doesn't properly unlock the mutex or free allocated
data.

Patch attached to fix.
Index: lib/util.c
===================================================================
--- lib/util.c	(revision 1468)
+++ lib/util.c	(working copy)
@@ -552,6 +552,8 @@
 
 	instance = malloc (instanceSize);
 	if (instance == 0) {
+		free (newHandles);
+		pthread_mutex_unlock (&handleDatabase->mutex);
 		return (SA_AIS_ERR_NO_MEMORY);
 	}
 
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to