Преглед изворни кода

Make sure to unlock the handle database on a failure condition.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1485 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake пре 18 година
родитељ
комит
632d33d4e7
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      lib/util.c

+ 2 - 0
lib/util.c

@@ -573,6 +573,8 @@ saHandleCreate (
 
 	instance = malloc (instanceSize);
 	if (instance == 0) {
+		free (newHandles);
+		pthread_mutex_unlock (&handleDatabase->mutex);
 		return (SA_AIS_ERR_NO_MEMORY);
 	}