projects
/
profile
/
mobile
/
apps
/
native
/
indicator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e14ad24
)
utils: return dynamically allocated mem for consistency
39/146039/1
submit/tizen/20170825.140403
author
Lukasz Stanislawski
<l.stanislaws@samsung.com>
Thu, 24 Aug 2017 14:23:08 +0000
(16:23 +0200)
committer
Lukasz Stanislawski
<l.stanislaws@samsung.com>
Thu, 24 Aug 2017 14:23:08 +0000
(16:23 +0200)
In error case function returned statically allocated memeory
which was afterwards free by function user.
Change-Id: Iad7b0dde5e5808bc813cc495c950bbff6c746643
src/util.c
patch
|
blob
|
history
diff --git
a/src/util.c
b/src/util.c
index
c969d7b
..
5876357
100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-358,7
+358,7
@@
void util_get_timezone_str(char **timezone)
int ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, timezone);
if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
_E("system_settings_get_value_string failed: %s", get_error_message(ret));
- *timezone =
"N/A"
;
+ *timezone =
strdup("N/A")
;
}
}