Change-Id: I9b15df8b4f5873416eb6ec362ad56e60a74c7ed9
Signed-off-by: s414.kim <s414.kim@samsung.com>
Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
#include "vconf.h"
+#include <cstdlib>
+
static void keyChangedCallback(keynode_t *node, void *data)
{
Vconf *vconf = reinterpret_cast<Vconf *>(data);
{
}
-char *Vconf::getString()
+std::string Vconf::getString()
{
- return ::vconf_get_str(vconfKey.c_str());
+ char *tmp = ::vconf_get_str(vconfKey.c_str());
+ std::string ret = (tmp != nullptr) ? std::string(tmp) : std::string();
+ ::free(tmp);
+ return ret;
}
int Vconf::getInt()
#ifndef __ODE_VCONF_H__
#define __ODE_VCONF_H__
+#include <string>
+
#include <vconf.h>
#include "../../widgets/signal.h"
Vconf(const std::string &key);
~Vconf();
- char *getString();
+ std::string getString();
int getInt();
bool getBool();
progress = vconf_get_str(VCONFKEY_ODE_ERASE_PROGRESS);
if (progress) {
percentage = atoi(progress);
+ free(progress);
} else {
delete_notification(ud->notification);
ui_app_exit();