[SSSD] [PATCH] IFP: Add a utility function to reply with an object path

Jakub Hrozek jakub.hrozek at gmail.com
Sun May 11 20:58:24 UTC 2014


On Sun, 2014-05-11 at 19:18 +0200, Pavel Březina wrote:
> On 05/11/2014 04:40 PM, Jakub Hrozek wrote:
> > Hi,
> >
> > the attached patches add utility functions that allow the InfoPipe
> > responder to reply with an object path, escaped if needed.
> >
> > The ifp_reply_objpath() function was initially in my tree, but Pavel
> > improved it quite a bit and fixed some bugs, so the patch should be
> > attributed to him. I'm also fine with his code...Pavel, can you
> > ack^Wreview the other two?
> 
> Hi, sure.
> 
> You're leaking memory in ifp_bus_path_escape/ifp_bus_path_unescape when 
> the append operation fails, but I think we can keep it that way since 
> the mem_ctx is bounded to a request which is supposed to end shortly.
> 
> Cleaner solution would be to free the path on error, but I'll keep it up 
> to yours decision.
> 
> Ack from my side.

I think it would be nicer to to free the buffer on error, that would
also allow us to use leak checks in the unit tests.

I'll send new versions.




More information about the sssd-devel mailing list