Explorar el Código

hdb: unlock hdb database when instance init fails

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse hace 12 años
padre
commit
ac2ce81429
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      include/corosync/hdb.h

+ 1 - 0
include/corosync/hdb.h

@@ -161,6 +161,7 @@ static inline int hdb_handle_create (
 
 	instance = (void *)malloc (instance_size);
 	if (instance == 0) {
+		hdb_database_unlock (&handle_database->lock);
 		errno = ENOMEM;
 		return (-1);
 	}