fix resource leak (on failure path) in sidtab_insert
PATCH 1/1 fix resource leak (on failure path) in sidtab_insert
This patch fixes a trivial bug found in avc_sidtab.c by Coverity:
When the newctx malloc fails in sidtab_insert(), newnode, which was previously malloced, is never freed.
avc_sidtab.c +1 -0
@@ -58,6 +58,7 @@ sidtab_insert(struct sidtab *s, security newctx = (security_context_t )strdup (ctx);if (!newctx) { rc =-1 ; +avc_free (newnode); goto out; }
--
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.