summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-04-15 13:05:30 +0200
committerAlexander Larsson <alexl@redhat.com>2011-04-15 13:05:30 +0200
commit7460f26f9243e6b1745a448b8dc05b15d12aa86e (patch)
treed2685ee3d982117e780297d8cd5947c3eb345f78
parent0babec2c24287a8578be488dacb0428998aa5648 (diff)
downloadgvfs-7460f26f9243e6b1745a448b8dc05b15d12aa86e.tar.gz
Don't leak dbus messages
We're missing a lot of dbus_message_unref after sending messages, add them.
-rw-r--r--daemon/daemon-main.c1
-rw-r--r--daemon/gvfsjobcopy.c2
-rw-r--r--daemon/gvfsjobcreatemonitor.c1
-rw-r--r--daemon/gvfsjobdelete.c1
-rw-r--r--daemon/gvfsjobenumerate.c1
-rw-r--r--daemon/gvfsjobmakedirectory.c1
-rw-r--r--daemon/gvfsjobmakesymlink.c1
-rw-r--r--daemon/gvfsjobmountmountable.c1
-rw-r--r--daemon/gvfsjobmove.c1
-rw-r--r--daemon/gvfsjobopenforread.c1
-rw-r--r--daemon/gvfsjobopenforwrite.c1
-rw-r--r--daemon/gvfsjobopeniconforread.c1
-rw-r--r--daemon/gvfsjobpollmountable.c1
-rw-r--r--daemon/gvfsjobpull.c1
-rw-r--r--daemon/gvfsjobpush.c1
-rw-r--r--daemon/gvfsjobqueryattributes.c1
-rw-r--r--daemon/gvfsjobqueryfsinfo.c1
-rw-r--r--daemon/gvfsjobqueryinfo.c1
-rw-r--r--daemon/gvfsjobsetattribute.c1
-rw-r--r--daemon/gvfsjobsetdisplayname.c1
-rw-r--r--daemon/gvfsjobstartmountable.c1
-rw-r--r--daemon/gvfsjobstopmountable.c1
-rw-r--r--daemon/gvfsjobtrash.c1
-rw-r--r--daemon/gvfsjobunmount.c1
-rw-r--r--daemon/gvfsjobunmountmountable.c1
-rw-r--r--daemon/gvfsmonitor.c12
-rw-r--r--daemon/mount.c28
27 files changed, 55 insertions, 11 deletions
diff --git a/daemon/daemon-main.c b/daemon/daemon-main.c
index 22cebe60..13e4780a 100644
--- a/daemon/daemon-main.c
+++ b/daemon/daemon-main.c
@@ -127,6 +127,7 @@ send_spawned (DBusConnection *connection, gboolean succeeded, char *error_messag
_g_dbus_oom ();
dbus_connection_send (connection, message, NULL);
+ dbus_message_unref (message);
/* Make sure the message is sent */
dbus_connection_flush (connection);
}
diff --git a/daemon/gvfsjobcopy.c b/daemon/gvfsjobcopy.c
index 730e1e20..e833168a 100644
--- a/daemon/gvfsjobcopy.c
+++ b/daemon/gvfsjobcopy.c
@@ -104,6 +104,8 @@ g_vfs_job_copy_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
+
return NULL;
}
diff --git a/daemon/gvfsjobcreatemonitor.c b/daemon/gvfsjobcreatemonitor.c
index 074a8665..e825de36 100644
--- a/daemon/gvfsjobcreatemonitor.c
+++ b/daemon/gvfsjobcreatemonitor.c
@@ -104,6 +104,7 @@ g_vfs_job_create_monitor_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobdelete.c b/daemon/gvfsjobdelete.c
index 688e6045..bbc38918 100644
--- a/daemon/gvfsjobdelete.c
+++ b/daemon/gvfsjobdelete.c
@@ -96,6 +96,7 @@ g_vfs_job_delete_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobenumerate.c b/daemon/gvfsjobenumerate.c
index 90ff4520..208f0ba6 100644
--- a/daemon/gvfsjobenumerate.c
+++ b/daemon/gvfsjobenumerate.c
@@ -110,6 +110,7 @@ g_vfs_job_enumerate_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobmakedirectory.c b/daemon/gvfsjobmakedirectory.c
index 2e9c7e22..61257d95 100644
--- a/daemon/gvfsjobmakedirectory.c
+++ b/daemon/gvfsjobmakedirectory.c
@@ -96,6 +96,7 @@ g_vfs_job_make_directory_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobmakesymlink.c b/daemon/gvfsjobmakesymlink.c
index 157e70f8..0ea22fae 100644
--- a/daemon/gvfsjobmakesymlink.c
+++ b/daemon/gvfsjobmakesymlink.c
@@ -99,6 +99,7 @@ g_vfs_job_make_symlink_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobmountmountable.c b/daemon/gvfsjobmountmountable.c
index 1d60836d..6cc2ea2c 100644
--- a/daemon/gvfsjobmountmountable.c
+++ b/daemon/gvfsjobmountmountable.c
@@ -109,6 +109,7 @@ g_vfs_job_mount_mountable_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobmove.c b/daemon/gvfsjobmove.c
index 0f3b7a25..9a6bd894 100644
--- a/daemon/gvfsjobmove.c
+++ b/daemon/gvfsjobmove.c
@@ -104,6 +104,7 @@ g_vfs_job_move_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobopenforread.c b/daemon/gvfsjobopenforread.c
index 31265db7..d217c273 100644
--- a/daemon/gvfsjobopenforread.c
+++ b/daemon/gvfsjobopenforread.c
@@ -106,6 +106,7 @@ g_vfs_job_open_for_read_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobopenforwrite.c b/daemon/gvfsjobopenforwrite.c
index 6d368f84..6e7396c7 100644
--- a/daemon/gvfsjobopenforwrite.c
+++ b/daemon/gvfsjobopenforwrite.c
@@ -116,6 +116,7 @@ g_vfs_job_open_for_write_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
g_free (path);
return NULL;
}
diff --git a/daemon/gvfsjobopeniconforread.c b/daemon/gvfsjobopeniconforread.c
index 1e36a246..59e813a3 100644
--- a/daemon/gvfsjobopeniconforread.c
+++ b/daemon/gvfsjobopeniconforread.c
@@ -87,6 +87,7 @@ g_vfs_job_open_icon_for_read_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobpollmountable.c b/daemon/gvfsjobpollmountable.c
index 4fa67b16..ac59da23 100644
--- a/daemon/gvfsjobpollmountable.c
+++ b/daemon/gvfsjobpollmountable.c
@@ -99,6 +99,7 @@ g_vfs_job_poll_mountable_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobpull.c b/daemon/gvfsjobpull.c
index 4d66bf0e..1d4bc78f 100644
--- a/daemon/gvfsjobpull.c
+++ b/daemon/gvfsjobpull.c
@@ -107,6 +107,7 @@ g_vfs_job_pull_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobpush.c b/daemon/gvfsjobpush.c
index 49680b33..b4b38740 100644
--- a/daemon/gvfsjobpush.c
+++ b/daemon/gvfsjobpush.c
@@ -107,6 +107,7 @@ g_vfs_job_push_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobqueryattributes.c b/daemon/gvfsjobqueryattributes.c
index 426a26b3..3307cfab 100644
--- a/daemon/gvfsjobqueryattributes.c
+++ b/daemon/gvfsjobqueryattributes.c
@@ -100,6 +100,7 @@ g_vfs_job_query_attributes_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobqueryfsinfo.c b/daemon/gvfsjobqueryfsinfo.c
index cce7ded7..e4645909 100644
--- a/daemon/gvfsjobqueryfsinfo.c
+++ b/daemon/gvfsjobqueryfsinfo.c
@@ -101,6 +101,7 @@ g_vfs_job_query_fs_info_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobqueryinfo.c b/daemon/gvfsjobqueryinfo.c
index 3a525390..27c8edcb 100644
--- a/daemon/gvfsjobqueryinfo.c
+++ b/daemon/gvfsjobqueryinfo.c
@@ -110,6 +110,7 @@ g_vfs_job_query_info_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobsetattribute.c b/daemon/gvfsjobsetattribute.c
index c9082165..ad2a8a2a 100644
--- a/daemon/gvfsjobsetattribute.c
+++ b/daemon/gvfsjobsetattribute.c
@@ -120,6 +120,7 @@ g_vfs_job_set_attribute_new (DBusConnection *connection,
_("Invalid dbus message"));
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobsetdisplayname.c b/daemon/gvfsjobsetdisplayname.c
index 9ac10a3d..0816c8bd 100644
--- a/daemon/gvfsjobsetdisplayname.c
+++ b/daemon/gvfsjobsetdisplayname.c
@@ -100,6 +100,7 @@ g_vfs_job_set_display_name_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobstartmountable.c b/daemon/gvfsjobstartmountable.c
index e8628463..b4492db8 100644
--- a/daemon/gvfsjobstartmountable.c
+++ b/daemon/gvfsjobstartmountable.c
@@ -105,6 +105,7 @@ g_vfs_job_start_mountable_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobstopmountable.c b/daemon/gvfsjobstopmountable.c
index 31f480ae..c291d38c 100644
--- a/daemon/gvfsjobstopmountable.c
+++ b/daemon/gvfsjobstopmountable.c
@@ -107,6 +107,7 @@ g_vfs_job_stop_mountable_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobtrash.c b/daemon/gvfsjobtrash.c
index e6f63886..338bf0dd 100644
--- a/daemon/gvfsjobtrash.c
+++ b/daemon/gvfsjobtrash.c
@@ -96,6 +96,7 @@ g_vfs_job_trash_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c
index ee2cb7e4..17e364f1 100644
--- a/daemon/gvfsjobunmount.c
+++ b/daemon/gvfsjobunmount.c
@@ -106,6 +106,7 @@ g_vfs_job_unmount_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsjobunmountmountable.c b/daemon/gvfsjobunmountmountable.c
index ed648cab..9cf9c2d3 100644
--- a/daemon/gvfsjobunmountmountable.c
+++ b/daemon/gvfsjobunmountmountable.c
@@ -108,6 +108,7 @@ g_vfs_job_unmount_mountable_new (DBusConnection *connection,
dbus_error_free (&derror);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
return NULL;
}
diff --git a/daemon/gvfsmonitor.c b/daemon/gvfsmonitor.c
index 4b91ecef..8947099f 100644
--- a/daemon/gvfsmonitor.c
+++ b/daemon/gvfsmonitor.c
@@ -184,8 +184,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
derror.name,
derror.message);
dbus_error_free (&derror);
-
+
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
else
{
@@ -199,8 +200,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
reply = dbus_message_new_method_return (message);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
-
+
return DBUS_HANDLER_RESULT_HANDLED;
}
else if (dbus_message_is_method_call (message,
@@ -216,8 +218,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
derror.name,
derror.message);
dbus_error_free (&derror);
-
+
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
else
{
@@ -235,9 +238,10 @@ vfs_monitor_message_callback (DBusConnection *connection,
break;
}
}
-
+
reply = dbus_message_new_method_return (message);
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
g_object_unref (monitor);
}
diff --git a/daemon/mount.c b/daemon/mount.c
index 23315595..6eb07d33 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -757,6 +757,7 @@ register_mount (DBusConnection *connection,
_g_dbus_oom ();
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
typedef struct {
@@ -778,6 +779,7 @@ automount_done (VfsMountable *mountable,
G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED,
_("Automount failed: %s"), error->message);
dbus_connection_send (data->connection, reply, NULL);
+ dbus_message_unref (reply);
}
else
lookup_mount (data->connection,
@@ -870,7 +872,10 @@ lookup_mount (DBusConnection *connection,
g_mount_spec_unref (spec);
if (reply != NULL)
- dbus_connection_send (connection, reply, NULL);
+ {
+ dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
+ }
}
static void
@@ -910,9 +915,12 @@ lookup_mount_by_fuse_path (DBusConnection *connection,
reply = dbus_message_new_error (message,
DBUS_ERROR_INVALID_ARGS,
"Invalid arguments");
-
+
if (reply != NULL)
- dbus_connection_send (connection, reply, NULL);
+ {
+ dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
+ }
}
static void
@@ -958,8 +966,9 @@ list_mounts (DBusConnection *connection,
if (!dbus_message_iter_close_container (&iter, &array_iter))
_g_dbus_oom ();
-
+
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
static void
@@ -1047,7 +1056,10 @@ mount_location (DBusConnection *connection,
}
if (reply)
- dbus_connection_send (connection, reply, NULL);
+ {
+ dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
+ }
else
{
GMountSource *source;
@@ -1099,8 +1111,9 @@ list_mount_types (DBusConnection *connection,
if (!dbus_message_iter_close_container (&iter, &array_iter))
_g_dbus_oom ();
-
+
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
static void
@@ -1140,8 +1153,9 @@ list_mountable_info (DBusConnection *connection,
if (!dbus_message_iter_close_container (&iter, &array_iter))
_g_dbus_oom ();
-
+
dbus_connection_send (connection, reply, NULL);
+ dbus_message_unref (reply);
}
static DBusHandlerResult