From: Jiyong Min Date: Mon, 13 Dec 2021 04:32:34 +0000 (+0900) Subject: replace g_memdup() to g_memdup2() X-Git-Tag: accepted/tizen/unified/20211222.230428^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e06012499bf80e3433fa27bc76ff72fbf3f84b5;p=platform%2Fcore%2Fapi%2Fimage-util.git replace g_memdup() to g_memdup2() - g_memdup() was removed in glib2 Change-Id: I63876f1ef83ec3176b56f902e7497ea61b861447 --- diff --git a/packaging/capi-media-image-util.spec b/packaging/capi-media-image-util.spec index cc5deca..9fc8abe 100644 --- a/packaging/capi-media-image-util.spec +++ b/packaging/capi-media-image-util.spec @@ -1,6 +1,6 @@ Name: capi-media-image-util Summary: A Image Utility library in Tizen Native API -Version: 0.3.1 +Version: 0.3.2 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/image_util.c b/src/image_util.c index 4b92cf8..497d8eb 100644 --- a/src/image_util.c +++ b/src/image_util.c @@ -377,7 +377,7 @@ static int __mm_util_transform_async(transformation_h handle, image_util_image_h image_util_retvm_if(!__is_valid_condition(handle), IMAGE_UTIL_ERROR_INVALID_PARAMETER, "Invalid transform condition"); _t_data = g_new0(t_data_s, 1); - _t_data->transform = g_memdup(_handle, sizeof(transformation_s)); + _t_data->transform = g_memdup2(_handle, sizeof(transformation_s)); if (is_transform2) { ret = image_util_clone_image(src, &_t_data->src); diff --git a/src/image_util_decode.c b/src/image_util_decode.c index eccc00e..faf4bdd 100644 --- a/src/image_util_decode.c +++ b/src/image_util_decode.c @@ -197,7 +197,7 @@ int image_util_decode_set_input_buffer(image_util_decode_h handle, const unsigne IMAGE_UTIL_SAFE_G_FREE(_handle->path); g_free(_handle->src_buffer); - _handle->src_buffer = g_memdup(src_buffer, src_size); + _handle->src_buffer = g_memdup2(src_buffer, src_size); _handle->src_size = src_size; return err; diff --git a/test/image_util_testsuite.c b/test/image_util_testsuite.c index 342489e..01a8a4e 100644 --- a/test/image_util_testsuite.c +++ b/test/image_util_testsuite.c @@ -1138,7 +1138,7 @@ static void __encode_to_buffer_completed_cb(image_util_error_e error_code, unsig return; } - result->buffer = g_memdup(buffer, buffer_size); + result->buffer = g_memdup2(buffer, buffer_size); __signal(); }