diff options
-rw-r--r-- | src/mds-registry.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mds-registry.c b/src/mds-registry.c index b16e8d9..b0c6962 100644 --- a/src/mds-registry.c +++ b/src/mds-registry.c @@ -485,6 +485,8 @@ static int handle_close_message(void) size_t* keys = NULL; size_t* old_keys; + fail_if ((errno = pthread_mutex_lock(®_mutex))); + for (i = 0; i < received.header_count; i++) if (startswith(received.headers[i], "Client closed: ")) { @@ -518,6 +520,8 @@ static int handle_close_message(void) free(command); } + pthread_mutex_unlock(®_mutex); + free(keys); return 0; pfail: |