projects
/
profile
/
mobile
/
apps
/
native
/
accessibility-setting.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26323d2
)
fix for resource leak
44/212244/3
accepted/tizen/unified/20190905.232229
submit/tizen/20190828.061756
submit/tizen/20190829.043227
submit/tizen/20190829.094028
submit/tizen/20190830.023608
submit/tizen/20190830.034707
submit/tizen/20190905.064609
author
Radoslaw Cybulski
<r.cybulski@partner.samsung.com>
Mon, 19 Aug 2019 08:00:10 +0000
(10:00 +0200)
committer
Lukasz Oleksak
<l.oleksak@samsung.com>
Wed, 21 Aug 2019 10:01:28 +0000
(10:01 +0000)
Fix for leak of memory, where memory allocated by vconf_get_key would
not be freed.
Change-Id: If4e7ba2aaee28c261ebf77e7ac73a72f74ce78b3
src/service/VConf.cpp
patch
|
blob
|
history
diff --git
a/src/service/VConf.cpp
b/src/service/VConf.cpp
index
308a9e0
..
1994110
100644
(file)
--- a/
src/service/VConf.cpp
+++ b/
src/service/VConf.cpp
@@
-202,8
+202,11
@@
class VConfImpl : public VConfInterface
{
auto k = keyPrefix + key;
auto vconfStr = vconf_get_str(k.c_str());
- if (vconfStr)
- return std::string{vconfStr};
+ if (vconfStr) {
+ auto s = std::string{ vconfStr };
+ free(vconfStr);
+ return std::move(s);
+ }
WARNING("Vconf: cant get value for key: %s, returning default value = %s", k.c_str(), value.c_str());
return value;