[SSSD] [PATCH] RESOLV: Do not steal the resulting hostent on error

Pavel Březina pbrezina at redhat.com
Mon Dec 17 13:00:23 UTC 2012


On 12/17/2012 01:54 PM, Simo Sorce wrote:
> On Mon, 2012-12-17 at 13:05 +0100, Pavel Březina wrote:
>> On 12/16/2012 11:38 PM, Jakub Hrozek wrote:
>>> I have not reproduced the access-after-free described in
>>> https://fedorahosted.org/sssd/ticket/1706 but the backtrace matches the
>>> fix and I think it's simply the correct thing to do.
>>
>> Ack.
>>
>> It may be also a good idea to use talloc_zfree() when freeing
>> state->rhostent instead of talloc_free().
>
> Are we guaranteed that on error there is a valid value in
> state->rhostent ?
>
> Simo.
>

No. I think that is the point of this patch.



More information about the sssd-devel mailing list