[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] libsepol: resource leak in avrule_decl_create
This patch fixes a resource leak found by Coverity:
avrule_decl_destroy(decl) does not free decl itself.
Must do so manually on after avrule_decl_destroy().
thanks,
-serge
Index: src/avrule_block.c
===================================================================
--- src.orig/avrule_block.c
+++ src/avrule_block.c
@@ -49,6 +49,7 @@ avrule_decl_t *avrule_decl_create(uint32
for (i = 0; i < SYM_NUM; i++) {
if (symtab_init(&decl->symtab[i], symtab_sizes[i])) {
avrule_decl_destroy(decl);
+ free(decl);
return NULL;
}
}
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.
This mailing list archive is a service of Copilot Consulting.