summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2019-10-25 18:59:58 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2019-10-25 19:02:43 +0900
commitf0e1aa4adc4f80bc7e6d1f8406442da55d220b9c (patch)
treec20f28a1ac9de41efe6df84809f9274b6441abab
parent1bb5f2fe9308d1ed77e44a392c89ecad2f4ec42e (diff)
downloadlibrua-f0e1aa4adc4f80bc7e6d1f8406442da55d220b9c.tar.gz
librua-f0e1aa4adc4f80bc7e6d1f8406442da55d220b9c.tar.bz2
librua-f0e1aa4adc4f80bc7e6d1f8406442da55d220b9c.zip
Fix wrong implementation
- Duplicates output data Change-Id: I2fdb955544b4cfa7b9a94144c71c3308877e739a Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--src/rua_info.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rua_info.c b/src/rua_info.c
index f194256..372e4ab 100644
--- a/src/rua_info.c
+++ b/src/rua_info.c
@@ -773,7 +773,7 @@ API int rua_info_get_uri(rua_info_h info, char **uri)
}
if (info->value[RUA_INFO_URI]) {
- *uri = info->value[RUA_INFO_URI];
+ *uri = strdup(info->value[RUA_INFO_URI]);
if (*uri == NULL) {
_E("Out of memory");
return RUA_ERROR_OUT_OF_MEMORY;
@@ -793,7 +793,7 @@ API int rua_info_get_image(rua_info_h info, char **image)
}
if (info->value[RUA_INFO_IMAGE]) {
- *image = info->value[RUA_INFO_IMAGE];
+ *image = strdup(info->value[RUA_INFO_IMAGE]);
if (*image == NULL) {
_E("Out of memory");
return RUA_ERROR_OUT_OF_MEMORY;
@@ -813,7 +813,7 @@ API int rua_info_get_component_id(rua_info_h info, char **component_id)
}
if (info->value[RUA_INFO_COMPONENT_ID]) {
- *component_id = info->value[RUA_INFO_COMPONENT_ID];
+ *component_id = strdup(info->value[RUA_INFO_COMPONENT_ID]);
if (*component_id == NULL) {
_E("Out of memory");
return RUA_ERROR_OUT_OF_MEMORY;