[TNEXT-1095] Fix tc error 17/138617/1
authorHyunjee Kim <hj0426.kim@samsung.com>
Thu, 13 Jul 2017 04:31:30 +0000 (13:31 +0900)
committerHyunjee Kim <hj0426.kim@samsung.com>
Thu, 13 Jul 2017 04:31:49 +0000 (13:31 +0900)
Change-Id: Idb4aa2651114060b035c51b1fbe77272257ff1f0
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
src/utils_i18n_measure_format.cpp

index 38cc541..e4e38cf 100644 (file)
@@ -85,9 +85,9 @@ int i18n_measure_format_format(i18n_measure_format_h measure_format,
        int32_t ulen = i18n_ustring_get_length(uchar_result);
 
        retv_if(ulen <= 0, I18N_ERROR_INVALID_PARAMETER);
-       free(*append_to);
-       *append_to = (char *) malloc(ulen + 1);
 
+       *append_to = NULL;
+       *append_to = (char *) malloc(ulen + 1);
        retv_if(*append_to == NULL, I18N_ERROR_OUT_OF_MEMORY);
 
        i18n_ustring_copy_au(*append_to, uchar_result);