projects
/
platform
/
core
/
appfw
/
aul-1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20c1547
)
Fix resource leak
49/224349/1
author
Hwankyu Jhun
<h.jhun@samsung.com>
Mon, 10 Feb 2020 05:17:41 +0000
(14:17 +0900)
committer
Hwankyu Jhun
<h.jhun@samsung.com>
Mon, 10 Feb 2020 05:17:41 +0000
(14:17 +0900)
Change-Id: Ie11a830e97f13b55180ca8a5778a140502a1e963
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/aul_rsc_mgr_internal.c
patch
|
blob
|
history
diff --git
a/src/aul_rsc_mgr_internal.c
b/src/aul_rsc_mgr_internal.c
index
df33952
..
24562a7
100644
(file)
--- a/
src/aul_rsc_mgr_internal.c
+++ b/
src/aul_rsc_mgr_internal.c
@@
-113,12
+113,18
@@
static char *_get_group_type(xmlNode *xml_node)
tok = strtok_r(str, delim, &ptr);
/* not a group element */
- if (tok == NULL || strcmp(tok, "group"))
+ if (tok == NULL || strcmp(tok, "group")) {
+ free(str);
return NULL;
+ }
+
tok = strtok_r(NULL, delim, &ptr);
/* invalid element */
- if (tok == NULL)
+ if (tok == NULL) {
+ free(str);
return NULL;
+ }
+
ptr = strdup(tok);
free(str);