[libvirt] [PATCH 3/6] Remove bogus unref in virDBusMessageRead
Michal Privoznik
mprivozn at redhat.com
Thu Mar 20 17:16:02 UTC 2014
On 20.03.2014 13:28, Daniel P. Berrange wrote:
> The virDBusMessageRead method should not have side-effects on
> the message parameter passed in, so unref'ing it is wrong.
> The caller should unref only when they decided they are done
> with it.
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/util/virdbus.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/util/virdbus.c b/src/util/virdbus.c
> index d5d3e01..85f8e29 100644
> --- a/src/util/virdbus.c
> +++ b/src/util/virdbus.c
> @@ -1419,7 +1419,6 @@ int virDBusMessageRead(DBusMessage *msg,
> ret = virDBusMessageDecodeArgs(msg, types, args);
> va_end(args);
>
> - dbus_message_unref(msg);
> return ret;
> }
>
>
ACK, and there's no new mem leak as this functions is not used anywhere yet.
Michal
More information about the libvir-list
mailing list