-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/24/2010 06:49 AM, Stephen Gallagher wrote:
On 03/23/2010 04:51 PM, Simo Sorce wrote:
> On Tue, 23 Mar 2010 16:38:57 -0400
> Stephen Gallagher <sgallagh(a)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.
This time with the patch attached.
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel
- --
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/
iEYEARECAAYFAkup78oACgkQeiVVYja6o6MpVQCfRJaX/AdoZVjgr1J2zAXp3fFa
XLEAnjOgDp2Rshn0bR0x1nSw0CobsI9f
=UB7m
-----END PGP SIGNATURE-----