[PATCH] fix DBusError leaking libhal and libhal-storage

David Zeuthen david at fubar.dk
Sat Jul 22 08:08:03 PDT 2006


On Mon, 2006-07-17 at 18:06 +0200, Danny Kukawka wrote:
> Hi,
> 
> this patch fixes several DBusError leaks in libhal and libhal-storage. 
> 
> Please review.

So, how about making

> +#define LIBHAL_FREE_DBUS_ERROR(_dbus_error_)           \
> +       do {                                            \
> +               if (dbus_error_is_set(_dbus_error_))    \
> +                       dbus_error_free (_dbus_error_); \
> +       } while (0)
> +

complain to stderr if this macro is used but the error isn't set? I mean
we only should be using the macro if we know the error is set. With that
it looks good to me.

Thanks,
David




More information about the hal mailing list