-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/23/2010 04:51 PM, Simo Sorce wrote:
> On Tue, 23 Mar 2010 16:38:57 -0400
> Stephen Gallagher <sgall...@redhat.com> wrote:
> 
>> +        tempbuf = talloc_realloc(state, state->buf, uint8_t,
>> +                                 state->len + size);
>> +        if(!tempbuf) {
>> +            tevent_req_error(req, ENOMEM);
>>              return;
>>          }
>> +        state->buf = talloc_steal(state, tempbuf);
> 
> Why the use of tempbuf ?
> 
> you can simply do
> state->buf = talloc_realloc(state, state->buf, ...
> 
> if state->buf is null you abort the whole operation anyway.
> 
> The talloc_steal is also useless given that talloc_realloc doesn't
> change the parent.
> 
> Simo.
> 


You are absolutely correct, of course. New patch behaves better.

I also realized that I had added an extra variable to
pack_response_packet() in krb5_child.c that was never used (and
generated a compiler warning). I have removed it.

- -- 
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkup7lQACgkQeiVVYja6o6MHywCeJiu9x3vai3WJ6Vtgs2AH/hKf
eAUAnRE1IYoxo1uEpqlGktbwPsZy2bmA
=qdHO
-----END PGP SIGNATURE-----
_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to