projects
/
platform
/
core
/
api
/
webapi-plugins.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b2d0da
)
[common] remove unused over allocated memory
author
pius.lee
<pius.lee@samsung.com>
Mon, 8 Jun 2015 07:50:02 +0000
(16:50 +0900)
committer
pius.lee
<pius.lee@samsung.com>
Mon, 8 Jun 2015 07:50:33 +0000
(16:50 +0900)
Change-Id: Ic6cac10bdb3398745e2f3eb2c43ab6b677f7ee42
src/common/dbus_operation.cc
patch
|
blob
|
history
diff --git
a/src/common/dbus_operation.cc
b/src/common/dbus_operation.cc
index ecded9f3d4e441fd6e00e598c742334f8ed3ac73..1cb585357d1e4729c8da2c392b5363a3eccd61d8 100755
(executable)
--- a/
src/common/dbus_operation.cc
+++ b/
src/common/dbus_operation.cc
@@
-104,8
+104,8
@@
void DBusOperationArguments::AddArgumentString(const std::string& val) {
LoggerD("Enter");
const int length = val.length();
- char* p_val = new char[length
* 2
];
- strncpy(p_val, val.c_str(), length
* 2
); // TODO: is it safe?
+ char* p_val = new char[length
+1
];
+ strncpy(p_val, val.c_str(), length
+1
); // TODO: is it safe?
arguments_.push_back(ArgumentElement(ArgType::kTypeString, p_val));
}