evas - filter - fix memory leak if cmd not found by curve cmd
This commit is contained in:
parent
bbefeae071
commit
a725924b53
|
@ -1116,7 +1116,11 @@ evas_filter_command_curve_add(Evas_Filter_Context *ctx,
|
||||||
if (!copy) return -1;
|
if (!copy) return -1;
|
||||||
|
|
||||||
cmd = _command_new(ctx, EVAS_FILTER_MODE_CURVE, in, NULL, out);
|
cmd = _command_new(ctx, EVAS_FILTER_MODE_CURVE, in, NULL, out);
|
||||||
if (!cmd) return -1;
|
if (!cmd)
|
||||||
|
{
|
||||||
|
free(copy);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(copy, curve, 256 * sizeof(DATA8));
|
memcpy(copy, curve, 256 * sizeof(DATA8));
|
||||||
cmd->curve.data = copy;
|
cmd->curve.data = copy;
|
||||||
|
|
Loading…
Reference in New Issue