summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2015-11-25 20:34:54 +0300
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>2015-11-25 20:37:01 +0300
commita6737b065bcf680ab4c1dacb117f8f55e69a3af1 (patch)
tree4496707c8a1f8112062c1aaf55baaae0c3710695
parent22ed4d3c470bdd9e0fee75b23eeb4299594c82f4 (diff)
downloadswap-modules-a6737b065bcf680ab4c1dacb117f8f55e69a3af1.tar.gz
swap-modules-a6737b065bcf680ab4c1dacb117f8f55e69a3af1.tar.bz2
swap-modules-a6737b065bcf680ab4c1dacb117f8f55e69a3af1.zip
[FIX] webprobe: double free
Change-Id: I6c14aef1e6c7ceb6643597d61d3eaca48c3db4e7 Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
-rw-r--r--webprobe/webprobe_prof.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/webprobe/webprobe_prof.c b/webprobe/webprobe_prof.c
index 0da0809e..46b48ff7 100644
--- a/webprobe/webprobe_prof.c
+++ b/webprobe/webprobe_prof.c
@@ -231,16 +231,22 @@ int web_prof_disable(void)
ret = -EFAULT;
} else {
if (!__web_func_inst_remove(web_data->inspserver_addr,
- web_data->inspserver))
+ web_data->inspserver)) {
kfree(web_data->inspserver);
+ web_data->inspserver = NULL;
+ }
if (!__web_func_inst_remove(web_data->willexecute_addr,
- web_data->willexecute))
+ web_data->willexecute)) {
kfree(web_data->willexecute);
+ web_data->willexecute = NULL;
+ }
if (!__web_func_inst_remove(web_data->didexecute_addr,
- web_data->didexecute))
- kfree(web_data->willexecute);
+ web_data->didexecute)) {
+ kfree(web_data->didexecute);
+ web_data->didexecute = NULL;
+ }
}
} else {
pr_err("ERROR: Web profiling is already disabled\n");