projects
/
platform
/
core
/
system
/
buxton2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd251d7
)
Remove unnecessary check before free a pointer
67/122367/1
author
Semun Lee
<semun.lee@samsung.com>
Fri, 31 Mar 2017 06:17:28 +0000
(15:17 +0900)
committer
Semun Lee
<semun.lee@samsung.com>
Fri, 31 Mar 2017 06:19:38 +0000
(15:19 +0900)
cur_data cannot be NULL here.
Change-Id: Id7672a418aa9f0bf1b3ccb185159b22b02bf4424
Signed-off-by: Semun Lee <semun.lee@samsung.com>
common/direct.c
patch
|
blob
|
history
diff --git
a/common/direct.c
b/common/direct.c
index
9dc113f
..
fc38989
100644
(file)
--- a/
common/direct.c
+++ b/
common/direct.c
@@
-207,20
+207,16
@@
static int is_updated_data(enum buxton_layer_type type, const char *key,
return -1;
if (cur_data_len != len) {
- if (cur_data)
- free(cur_data);
-
+ free(cur_data);
return -1;
}
if (memcmp(cur_data, data, len)) {
- if (cur_data)
- free(cur_data);
+ free(cur_data);
return -1;
}
- if (cur_data)
- free(cur_data);
+ free(cur_data);
return 0;