Sfoglia il codice sorgente

Put handle to hdb in dispatch on unknown message

When we receive unknown dispatch type, we should put handle to hdb,
because it was correctly obtained. This problem is only cfg and confdb
libraries, cpg, evs, quorum, ... are not affected and works correctly.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse 13 anni fa
parent
commit
5a46106283
2 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 1 2
      lib/cfg.c
  2. 1 2
      lib/confdb.c

+ 1 - 2
lib/cfg.c

@@ -212,7 +212,7 @@ corosync_cfg_dispatch (
 		default:
 			coroipcc_dispatch_put (cfg_instance->handle);
 			error = CS_ERR_LIBRARY;
-			goto error_nounlock;
+			goto error_put;
 			break;
 		}
 		coroipcc_dispatch_put (cfg_instance->handle);
@@ -227,7 +227,6 @@ corosync_cfg_dispatch (
 
 error_put:
 	(void)hdb_handle_put (&cfg_hdb, cfg_handle);
-error_nounlock:
 	return (error);
 }
 

+ 1 - 2
lib/confdb.c

@@ -418,7 +418,7 @@ cs_error_t confdb_dispatch (
 			default:
 				coroipcc_dispatch_put (confdb_inst->handle);
 				error = CS_ERR_LIBRARY;
-				goto error_noput;
+				goto error_put;
 				break;
 		}
 		coroipcc_dispatch_put (confdb_inst->handle);
@@ -433,7 +433,6 @@ cs_error_t confdb_dispatch (
 
 error_put:
 	(void)hdb_handle_put (&confdb_handle_t_db, handle);
-error_noput:
 	return (error);
 }