policycoreutils: free memory of allocated context in newrole

Found by scan-build.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
Christian Göttsche 2021-07-14 20:13:43 +02:00 committed by James Carter
parent f0c354afc0
commit 32611aea65

View File

@ -1239,6 +1239,7 @@ int main(int argc, char *argv[])
free(pw.pw_dir);
free(pw.pw_shell);
free(shell_argv0);
free(new_context);
return exit_code;
}