codec: Prevent invalid mem access on realloc failure
@@ -1622,6 +1622,8 @@ skip_encoding_loop:
}
/* when using threads ensure all computations are done */
+ if (success)
+ {
message->tilesDataSize = 0;
workObject = context->priv->workObjects;
@@ -1646,8 +1648,8 @@ skip_encoding_loop:
region16_uninit(&tilesRegion);
region16_uninit(&rectsRegion);
- if (success)
return message;
+ }
WLog_ERR(TAG, "%s: failed", __FUNCTION__);
message->freeRects = TRUE;
