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

Stephen Gallagher sgallagh at redhat.com
Thu May 28 13:20:14 UTC 2009


On 05/28/2009 09:14 AM, Jakub Hrozek wrote:
> 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

Ack

-- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3258 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090528/f35422eb/attachment.p7s>


More information about the Freeipa-devel mailing list