[Freeipa-devel] [PATCH][SSSD] Fix serious memory allocation bug

Stephen Gallagher sgallagh at redhat.com
Mon Feb 23 20:50:03 UTC 2009


Fixing serious memory allocation bug in sbus_message_handler.
dbus_message_append_args() adds a reference to memory that is not copied
to the outgoing message until dbus_connection_send() is called. Since we
compile our reply messages in functions and then return the reply, we
need a mechanism for deleting allocated memory after invoking
dbus_connection_send. I have changed the arguments to
sbus_msg_handler_fn so that it takes a talloc ctx containing the
sbus_message_handler_ctx and a pointer to a reply object. We can now
allocate memory as a child of the reply context and free it after
calling dbus_connection_send.

SSSD developers take note of the parameter change for sbus_method
handlers. I have migrated all of the existing functions.
-- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Fixing-serious-memory-allocation-bug-in-sbus_message.patch
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090223/0de99e2e/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090223/0de99e2e/attachment.sig>


More information about the Freeipa-devel mailing list