summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2015-01-21 18:16:55 +0100
committerJeremy Allison <jra@samba.org>2015-01-22 00:57:09 +0100
commitf72fa6390b73f47a57033282335786c24664a3f8 (patch)
tree458f87f9b3508853bb8efb4c964af5235c922ec5 /source3/modules
parent4c3a3d9e6adc95d0f0e1f6030b2406613d9f9f53 (diff)
downloadsamba-f72fa6390b73f47a57033282335786c24664a3f8.tar.gz
samba-f72fa6390b73f47a57033282335786c24664a3f8.tar.xz
samba-f72fa6390b73f47a57033282335786c24664a3f8.zip
vfs_snapper: free dbus req messages in error paths
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11055 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_snapper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c
index 12a3b9a16e..ed6e073764 100644
--- a/source3/modules/vfs_snapper.c
+++ b/source3/modules/vfs_snapper.c
@@ -472,6 +472,7 @@ static NTSTATUS snapper_list_snaps_pack(char *snapper_conf,
dbus_message_iter_init_append(msg, &args);
if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING,
&snapper_conf)) {
+ dbus_message_unref(msg);
return NT_STATUS_NO_MEMORY;
}
@@ -690,16 +691,19 @@ static NTSTATUS snapper_list_snaps_at_time_pack(const char *snapper_conf,
dbus_message_iter_init_append(msg, &args);
if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING,
&snapper_conf)) {
+ dbus_message_unref(msg);
return NT_STATUS_NO_MEMORY;
}
if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_INT64,
&time_lower)) {
+ dbus_message_unref(msg);
return NT_STATUS_NO_MEMORY;
}
if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_INT64,
&time_upper)) {
+ dbus_message_unref(msg);
return NT_STATUS_NO_MEMORY;
}