[gvfs/mtp-backend: 8/64] MTP: Add missing mutex and free calls.



commit 19c4aa5b2d86ada54703e39d93d477651ade8d4c
Author: Philip Langdale <philipl cloudera com>
Date:   Fri Aug 3 14:40:06 2012 -0700

    MTP: Add missing mutex and free calls.

 daemon/gvfsbackendmtp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c
index ce00772..9638108 100644
--- a/daemon/gvfsbackendmtp.c
+++ b/daemon/gvfsbackendmtp.c
@@ -574,6 +574,7 @@ do_query_info (GVfsBackend *backend,
   g_vfs_job_succeeded (G_VFS_JOB (job));
 
  exit:
+  g_strfreev(elements);
   g_mutex_unlock (&G_VFS_BACKEND_MTP(backend)->mutex);
 }
 
@@ -873,6 +874,7 @@ do_delete (GVfsBackend *backend,
             const char *filename)
 {
   g_print ("(II) try_delete (filename = %s) \n", filename);
+  g_mutex_lock (&G_VFS_BACKEND_MTP(backend)->mutex);
 
   gchar **elements = g_strsplit_set(filename, "/", -1);
   unsigned int ne = 0;
@@ -918,6 +920,7 @@ do_set_display_name (GVfsBackend *backend,
                       const char *display_name)
 {
   g_print ("(II) try_set_display_name '%s' --> '%s' \n", filename, display_name);
+  g_mutex_lock (&G_VFS_BACKEND_MTP(backend)->mutex);
 
   gchar **elements = g_strsplit_set(filename, "/", -1);
   unsigned int ne = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]