From d57e37a5235d8ddafa67d4b4e4dca5f3c2126591 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Tue, 30 Apr 2013 14:33:09 +0200 Subject: Fix uninitialized mutex usage in synctask_destroy synctask_new() initialize task->mutex is task->synccbk is NULL. synctask_done() calls synctask_destroy() if task->synccbk is not NULL. synctask_destroy() always destroys the mutex. Fix that by checking for task->synccbk in synctask_destroy() BUG: 764655 Change-Id: I50bb53bc6e2738dc0aa830adc4c1ea37b24ee2a0 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/4913 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/syncop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index 4e3c93a45f8..f58bfcecab4 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -179,9 +179,10 @@ synctask_destroy (struct synctask *task) if (task->opframe) STACK_DESTROY (task->opframe->root); - pthread_mutex_destroy (&task->mutex); - - pthread_cond_destroy (&task->cond); + if (task->synccbk == NULL) { + pthread_mutex_destroy (&task->mutex); + pthread_cond_destroy (&task->cond); + } FREE (task); } -- cgit lue='release-3.3'>release-3.3
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2020-09-23 11:40:16 +0300
committerAmar Tumballi <amar@kadalu.io>2020-10-01 07:59:36 +0000
commit4ec05d087e07dc1ae2ada9d36ab2597c175890b4 (patch)
tree0dcf3402eef8e24211228ad130af504e9097fc59
parent66deb99e745c47abf527bde41164fd4034e97035 (diff)
build: drop -rdynamic from compiler flags
Since -rdynamic is meaningless during compilation, drop it from GF_CFLAGS. Note GF_LDFLAGS unconditionally use -rdynamic anyway. Change-Id: I07c7086a8a6adad8358b88999d98828c1cbfb464 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4efddf4e38b..e2d6fd66cec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -275,7 +275,7 @@ AC_ARG_ENABLE([debug],
[Enable debug build options.]))
if test "x$enable_debug" = "xyes"; then
BUILD_DEBUG=yes
- GF_CFLAGS="${GF_CFLAGS} -g -rdynamic -O0 -DDEBUG"
+ GF_CFLAGS="${GF_CFLAGS} -g -O0 -DDEBUG"
else
BUILD_DEBUG=no
fi