platform_external_selinux/libselinux
Christian Göttsche db69a3d362 libselinux: getdefaultcon: free memory on multiple same arguments
Do not leak memory if program arguments get specified more than once.

Found by clang-anlyzer.

getdefaultcon.c:52:3: warning: Potential leak of memory pointed to by 'level' [unix.Malloc]
                fprintf(stderr,
                ^~~~~~~~~~~~~~~
getdefaultcon.c:52:3: warning: Potential leak of memory pointed to by 'role' [unix.Malloc]
                fprintf(stderr,
                ^~~~~~~~~~~~~~~
getdefaultcon.c:52:3: warning: Potential leak of memory pointed to by 'service' [unix.Malloc]
                fprintf(stderr,
                ^~~~~~~~~~~~~~~

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2021-05-18 10:06:22 +02:00
..
include libselinux: accept const fromcon in get_context API 2021-01-20 16:53:34 +01:00
man selinux(8,5): Describe fcontext regular expressions 2021-02-19 15:18:05 +01:00
src libselinux: setexecfilecon(): drop dead assignment 2021-05-18 10:06:22 +02:00
utils libselinux: getdefaultcon: free memory on multiple same arguments 2021-05-18 10:06:22 +02:00
LICENSE initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile libselinux: do not duplicate make target when going into subdirectory 2021-04-30 21:09:22 +02:00
VERSION Update VERSIONs to 3.2 for release. 2021-03-04 16:42:59 +01:00