about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-05-23 10:21:32 +0000
committerEric Wong <normalperson@yhbt.net>2014-05-23 10:23:50 +0000
commit565f1d67f7ce95f1a34bbcd9c3d90c1bb058bf9c (patch)
tree7a25036b09d79c00d4066774c28a2e89532e160d
parenta59d6e528febec2d7bce6963adae437a79a20410 (diff)
downloadcmogstored-ccan-list.tar.gz
We do not need to be holding devstats_lock when releasing
a local buffer which will never be used by another thread.
-rw-r--r--svc_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/svc_dev.c b/svc_dev.c
index f618a9b..ea41c11 100644
--- a/svc_dev.c
+++ b/svc_dev.c
@@ -246,10 +246,10 @@ bool mog_svc_devstats_broadcast(void *ent, void *ignored)
                 }
         }
 out:
-        free(buf);
-
         CHECK(int, 0, pthread_mutex_unlock(&svc->devstats_lock));
 
+        free(buf);
+
         return true;
 }