[PATCH] libhal memleak

Dan Williams dcbw at redhat.com
Wed Aug 4 06:23:04 PDT 2004


Hi,

Unless I'm wrong, using NULL functions for the LibHalFunctions may
result in small memory leaks.  For some functions (namely the signals)
that libhal's filter function receives, we have this construct:

if (dbus_message_get_args(blah, blah, &udi, blah))
{
	if (ctx->functions->blah != NULL)
	{
		do something
		dbus_free (udi);
	}
}

The dbus_free(...) should be outside the check for (ctx->functions-
>xxx != NULL)

Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-memfix.patch
Type: text/x-patch
Size: 937 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20040804/53a46bb4/hal-memfix.bin
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list