From f72fa6390b73f47a57033282335786c24664a3f8 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Wed, 21 Jan 2015 18:16:55 +0100 Subject: vfs_snapper: free dbus req messages in error paths Bug: https://bugzilla.samba.org/show_bug.cgi?id=11055 Signed-off-by: David Disseldorp Reviewed-by: Jeremy Allison --- source3/modules/vfs_snapper.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/modules') 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; } -- cgit