chiark / gitweb /
selinux: fix potential double free crash in child process
authorMichal Sekletar <msekleta@redhat.com>
Mon, 13 Oct 2014 13:25:09 +0000 (15:25 +0200)
committerMichal Sekletar <msekleta@redhat.com>
Wed, 15 Oct 2014 08:58:27 +0000 (10:58 +0200)
commit5e78424f4a27c07be50e246308035c877f204038
tree3b0919de1031075f4aa6dcf08e3cd05fa80415e9
parent3e883473a0f36c220fc45ecf61d6878c9ac308b4
selinux: fix potential double free crash in child process

Before returning from function we should reset ret to NULL, thus cleanup
function is nop.

Also context_str() returns pointer to a string containing context but not a
copy, hence we must make copy it explicitly.
src/shared/label.c