From: Vyacheslav Cherkashin Date: Mon, 27 Jul 2015 10:46:20 +0000 (+0300) Subject: [FIX] memory leak in nsp X-Git-Tag: submit/tizen_2.4/20150912.103527~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1fabea042633f0640d15c695983a4f2cfd86c0e;p=kernel%2Fswap-modules.git [FIX] memory leak in nsp Change-Id: I34d5b3f7f92739bb92acd6706991cbe28549d4f7 Signed-off-by: Vyacheslav Cherkashin --- diff --git a/nsp/nsp.c b/nsp/nsp.c index 0f404a9..3a0fc6f 100644 --- a/nsp/nsp.c +++ b/nsp/nsp.c @@ -102,6 +102,17 @@ static struct dentry *lpad_dentry; static const char *libappcore_path; static struct dentry *libappcore_dentry; +static void uninit_variables(void) +{ + kfree(lpad_path); + lpad_path = NULL; + lpad_dentry = NULL; + + kfree(libappcore_path); + libappcore_path = NULL; + libappcore_dentry = NULL; +} + static bool is_init(void) { return lpad_dentry && libappcore_dentry; @@ -780,4 +791,6 @@ void nsp_exit(void) { if (stat == NS_ON) set_stat_off(); + + uninit_variables(); }