On Tue, Mar 22, 2016 at 4:28 PM, Serge E. Hallyn <[email protected]> wrote:
> Quoting Colin King ([email protected]):
>> From: Colin Ian King <[email protected]>
>>
>> node_ptr is not being free'd if the list allocation fails, fix
>> this by kfree'ing it before exiting on the error path.
>>
>> Signed-off-by: Colin Ian King <[email protected]>
>
> Hi,
>
> I'm not very familiar with this code any more, but are you sure
> this is needed and doesn't cause a new bug?  It *looks* like
> the avtab_insert_nonunique() actually inserts the node_ptr
> into the policydb, and the policydb is the one that should
> eventually free it.

Exactly.  cond_insertf() calls avtab_insert_nonunique() which calls
avtab_insert_node() which adds the node to the avtab.  The avtab will
get cleaned up later by the error handling code in the cond_insertf()
call chain.

-- 
paul moore
www.paul-moore.com

Reply via email to