projects
/
platform
/
kernel
/
swap-modules.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
686fd9c
)
[FIX] WSP: double free
author
Alexander Aksenov
<a.aksenov@samsung.com>
Fri, 30 Oct 2015 09:05:07 +0000
(12:05 +0300)
committer
Alexander Aksenov
<a.aksenov@samsung.com>
Fri, 30 Oct 2015 09:40:26 +0000
(12:40 +0300)
Issue:
Freeing pointer to the memory that was already freed.
Solution:
Set pointer to NULL after free. kfree(NULL) is safe according
to standart.
Change-Id: I5fd0ceee1078a71d17a44aacb1319b116f5d5c9d
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
wsp/wsp.c
patch
|
blob
|
history
diff --git
a/wsp/wsp.c
b/wsp/wsp.c
index
85b8bdf
..
ac59030
100644
(file)
--- a/
wsp/wsp.c
+++ b/
wsp/wsp.c
@@
-383,6
+383,7
@@
static void do_set_path(char **dest, char *path, size_t len)
static void do_free_path(char **dest)
{
kfree(*dest);
+ *dest = NULL;
}