free conary on error path in get_default_context()
PATCH 1/1 free conary on error path in get_default_context()
This patch fixes a trivial bug found in get_context_list.c by Coverity:
When strdup(conary) fails, conary is not freed.
get_context_list.c +1 -1
@@ -60,9 +60,9 @@ int get_default_context(const char* userreturn -1 ; *newcon =strdup (conary[0 ]); +freeconary (conary);if (!(*newcon))return -1 ; -freeconary (conary);return 0 ; }
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.