[PATCH] Fix seg fault in torture rpc.spoolss.printer

Kamen Mazdrashki kamenim at samba.org
Mon Dec 29 17:15:37 MST 2014


Hi Garming,

On Tue, Dec 30, 2014 at 1:33 AM, Garming Sam <garming at catalyst.net.nz>
wrote:

> Looks like Jeremy already pushed.
>
> Anyways, thanks.
>
> I did actually consider it briefly, but kind of thought it would slightly
> more difficult to misplace the assignment to NULL than to replace
> talloc_free with TALLOC_FREE by accident for instance. I probably would've
> changed it anyways.
>
>
The patch is semantically correct anyway :)
Thanks for fixing it!


>
> Garming
>
>
>
> On 30/12/14 12:27, Kamen Mazdrashki wrote:
>
>> Hi Garming,
>>
>> On Tue, Dec 30, 2014 at 12:51 AM, Garming Sam <garming at catalyst.net.nz>
>> wrote:
>>
>>  Hi,
>>>
>>> I recently noticed a seg fault while running make test. It was using
>>> memory after being freed when logging error/warning messages.
>>>
>>> Attached is a patch which appears to fix the issue by simply nulling out
>>> the pointer after being freed.
>>>
>>> Imo, as a shortcut, TALLOC_FREE() should be better.
>>>
>> Other that that, reviewed by me
>>
>> --
>> Kamen
>>
>>
>>  Please review and push.
>>>
>>> Cheers,
>>>
>>> Garming Sam
>>>
>>>
>


More information about the samba-technical mailing list