diff options
-rw-r--r-- | src/mds-registry/mds-registry.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mds-registry/mds-registry.c b/src/mds-registry/mds-registry.c index df3db51..f4ed92c 100644 --- a/src/mds-registry/mds-registry.c +++ b/src/mds-registry/mds-registry.c @@ -117,19 +117,17 @@ int initialise_server(void) */ fail_if (full_send(message, strlen(message))); stage++; - fail_if (hash_table_create_tuned(®_table, 32)); stage++; + fail_if (hash_table_create_tuned(®_table, 32)); reg_table.key_comparator = (compare_func*)string_comparator; reg_table.hasher = (hash_func*)string_hash; - fail_if (server_initialised() < 0); + fail_if (server_initialised() < 0); stage++; fail_if (mds_message_initialise(&received)); return 0; fail: xperror(*argv); - if (stage == 1) - hash_table_destroy(®_table, NULL, NULL); - if (stage == 2) - mds_message_destroy(&received); + if (stage >= 1) hash_table_destroy(®_table, NULL, NULL); + if (stage >= 2) mds_message_destroy(&received); return 1; } |