return MS_MEDIA_ERR_INVALID_PARAMETER;
}
- temp_buf = (unsigned char*)malloc(_size);
+ temp_buf = (unsigned char*)g_malloc0(_size);
if (temp_buf == NULL) {
dcm_error("Failed to allocate memory");
return MS_MEDIA_ERR_OUT_OF_MEMORY;
}
- /* initialize */
- memset(temp_buf, 0x00, _size);
+
width = *ori_width;
height = *ori_height;
}
*size = buffer_size;
- resize_buffer = (unsigned char *)malloc(sizeof(unsigned char) * (buffer_size));
+ resize_buffer = (unsigned char *)g_malloc0(sizeof(unsigned char) * (buffer_size));
if (resize_buffer != NULL) {
ret = image_util_resize(resize_buffer, (int *)buff_width, (int *)buff_height, decode_buffer, decode_width, decode_height, colorspace);
DCM_SAFE_FREE(decode_buffer);