Просмотр исходного кода

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 лет назад
Родитель
Сommit
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);
 	}