Re: [PATCH] SELinux: memory leak in security_context_to_sid_core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 3 Sep 2008, Stephen Smalley wrote:

> > +	context_destroy(ctx);
> 
> Doesn't this introduce a double free on that code path (caller will also
> call context_destroy on the same context, which it passed in).

Indeed, context_destroy will be called twice and it's a bug, although 
kfree() will not be called twice on the same pointer (e.g. c->str is set 
to NULL, as is e->node).

It needs to be fixed, but it's not a double free, unless I'm missing 
something.


- James
-- 
James Morris
<jmorris@xxxxxxxxx>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux