diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-07-28 17:38:35 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-07-28 17:38:35 +0200 |
commit | a8ed9b898568b200e17dd14b51d83bc70601d162 (patch) | |
tree | b9c4d71ef3466380bc54f0fabaed521ad2961a81 /src | |
parent | mds-registry: all unmarshal failures are critical (diff) | |
download | mds-a8ed9b898568b200e17dd14b51d83bc70601d162.tar.gz mds-a8ed9b898568b200e17dd14b51d83bc70601d162.tar.bz2 mds-a8ed9b898568b200e17dd14b51d83bc70601d162.tar.xz |
use of mutexe when removing protocols due to server closing
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-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: |