aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-registry.c4
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(&reg_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(&reg_mutex);
+
free(keys);
return 0;
pfail: