From 446a21c9ac664f7456e2e4e739979baab8ba13c1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 23 May 2014 10:21:32 +0000 Subject: svc_dev: calling free does not need the lock We do not need to be holding devstats_lock when releasing a local buffer which will never be used by another thread. --- svc_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svc_dev.c b/svc_dev.c index bb83128..393feeb 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; } -- cgit v1.2.3-24-ge0c7