[Freeipa-devel] [PATCH] Make Data Provider a mandatory service

Jakub Hrozek jhrozek at redhat.com
Thu May 28 13:14:16 UTC 2009


On Thu, 2009-05-28 at 08:33 -0400, Stephen Gallagher wrote:
> You're right, I wasn't paying attention. Please make on additional
> change regarding the realloc. If talloc_realloc returns NULL, you've
> leaked the original memory, since it's only freed on success. It
> should
> look something like:
> 
> char *tmp_array = talloc_realloc(ctx, ctx->services, char *, i+2)
> if (tmp_array == NULL) {
>     return ENOMEM;
> }
> ctx->services = tmp_array;
> 
> At least this way, the ctx->services value remains reachable.
> 

You are right, done and attached. To my defense, I've seen this
potentially bad usage elsewhere in the code (i.e. confdb.c:372).

Jakub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-Data-Provider-a-mandatory-service.patch
Type: text/x-patch
Size: 1772 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090528/5fb0c49b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090528/5fb0c49b/attachment.sig>


More information about the Freeipa-devel mailing list