summaryrefslogtreecommitdiff
path: root/common/gmountsource.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2011-11-14 19:42:02 +0100
committerTomas Bzatek <tbzatek@redhat.com>2011-11-14 19:42:02 +0100
commit47a61b04fe209fc76b92de874c446d0a3f44c276 (patch)
tree26f8b01fd240b7e5017bdfc0c9ec40a12ec96229 /common/gmountsource.c
parent200fe6ee11a2bdc244d7ee9335940079756fb66b (diff)
downloadgvfs-47a61b04fe209fc76b92de874c446d0a3f44c276.tar.gz
Explicitly intialize mutexes on stack
Turned out zeroing memory is not enough in some cases so let's be on the safe side and properly initialize all non-static mutexes. Also, don't initialize/clear the static ones.
Diffstat (limited to 'common/gmountsource.c')
-rw-r--r--common/gmountsource.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/gmountsource.c b/common/gmountsource.c
index af89ed29..cf567fcb 100644
--- a/common/gmountsource.c
+++ b/common/gmountsource.c
@@ -380,6 +380,8 @@ g_mount_source_ask_password (GMountSource *source,
AskSyncData data;
memset (&data, 0, sizeof (data));
+ g_mutex_init (&data.mutex);
+ g_cond_init (&data.cond);
g_mutex_lock (&data.mutex);
@@ -549,6 +551,8 @@ g_mount_source_ask_question (GMountSource *source,
AskSyncData data;
memset (&data, 0, sizeof (data));
+ g_mutex_init (&data.mutex);
+ g_cond_init (&data.cond);
g_mutex_lock (&data.mutex);
g_mount_source_ask_question_async (source,
@@ -842,6 +846,8 @@ g_mount_source_show_processes (GMountSource *source,
AskSyncData data;
memset (&data, 0, sizeof (data));
+ g_mutex_init (&data.mutex);
+ g_cond_init (&data.cond);
g_mutex_lock (&data.mutex);
g_mount_source_show_processes_async (source,