security: smack: fix memleak in smk_write_rules_list()
authorTomasz Stanislawski <t.stanislaws@samsung.com>
Thu, 6 Jun 2013 07:30:50 +0000 (09:30 +0200)
committerChanho Park <parkch98@gmail.com>
Fri, 23 Jan 2015 14:22:28 +0000 (23:22 +0900)
commit8fb336eb27733905760e42a37e2bb72ebe779563
tree626cd650803306a45c68544dee1861b91eee15b8
parent61b7ff7ef1dcd8480c486795b0dbab830d1eab66
security: smack: fix memleak in smk_write_rules_list()

The smack_parsed_rule structure is allocated.  If a rule is successfully
installed then the last reference to the object is lost.  This patch fixes this
leak. Moreover smack_parsed_rule is allocated on stack because it no longer
needed ofter smk_write_rules_list() is finished.

Change-Id: I5b4dcadc6a9d675ab630b23c00edeaf595b5b857
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Ɓukasz Stelmach <l.stelmach@samsung.com>
security/smack/smackfs.c