for (type = 0; type <= LAST_IMAGE_TYPE; type++) {
IMAGEUTIL_SAFE_G_FREE(g_decode_result[type].buffer);
+ g_decode_result[type].size = 0;
IMAGEUTIL_SAFE_G_FREE(g_encode_result[type].buffer);
+ g_encode_result[type].size = 0;
+ g_encode_result[type].buffer_size = 0;
IMAGEUTIL_SAFE_G_FREE(g_source_path[type]);
IMAGEUTIL_SAFE_G_FREE(g_output_path[type]);
image_util_decode_destroy(g_decoder[type]);
for (type = 0; type <= LAST_IMAGE_TYPE; type++) {
IMAGEUTIL_SAFE_FREE(g_decode_result[type].buffer);
+ g_decode_result[type].size = 0;
IMAGEUTIL_SAFE_FREE(g_encode_result[type].buffer);
+ g_encode_result[type].size = 0;
+ g_encode_result[type].buffer_size = 0;
IMAGEUTIL_SAFE_G_FREE (g_source_path[type]);
IMAGEUTIL_SAFE_G_FREE (g_output_path[type]);
image_util_encode_destroy(g_encoder[type]);
wait_for_async();
assert_eq(callback_error, IMAGE_UTIL_ERROR_NONE);
assert_neq(g_encode_result[type].buffer, NULL);
- assert_gt(g_encode_result[type].size, 0);
+ assert_gt(g_encode_result[type].buffer_size, 0);
}
return 0;