Re: [libvirt] [PATCH] dbus: Don't unref NULL messages

2016-02-11 Thread Daniel P. Berrange
On Thu, Feb 11, 2016 at 11:25:05AM +0100, Michal Privoznik wrote: > Apparently we are not the only ones with dumb free functions > because dbus_message_unref() does not accept NULL either. But if > I were to vote, this one is even more evil. Instead of returning > an error just like we do it

[libvirt] [PATCH] dbus: Don't unref NULL messages

2016-02-11 Thread Michal Privoznik
Apparently we are not the only ones with dumb free functions because dbus_message_unref() does not accept NULL either. But if I were to vote, this one is even more evil. Instead of returning an error just like we do it immediately dereference any pointer passed and thus crash you app. Well done