diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2022-03-12 02:58:49 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2022-03-12 23:50:07 +0100 |
commit | a955c167adfed6461232f8a65b9e9e2773358061 (patch) | |
tree | 80e2861d310102c0d730f066c7fe0bb31df054e5 | |
parent | 355526df84a933b1a37e9d1a9650f9462936145a (diff) | |
download | libart-lgpl-a955c167adfed6461232f8a65b9e9e2773358061.tar.gz libart-lgpl-a955c167adfed6461232f8a65b9e9e2773358061.zip |
Fix possible memory leak in art_render_new.r14.0.12
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 3d29aa4f852813f6839ef930a5dba8ef7747eaa7)
-rw-r--r-- | src/art_render.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/art_render.c b/src/art_render.c index 65b344c..2f74929 100644 --- a/src/art_render.c +++ b/src/art_render.c @@ -48,9 +48,6 @@ art_render_new (int x0, int y0, int x1, int y1, ArtRenderPriv *priv; ArtRender *result; - priv = art_new (ArtRenderPriv, 1); - result = &priv->super; - if (n_chan > ART_MAX_CHAN) { art_warn ("art_render_new: n_chan = %d, exceeds %d max\n", @@ -68,6 +65,10 @@ art_render_new (int x0, int y0, int x1, int y1, art_warn ("art_render_new: x0 >= x1 (x0 = %d, x1 = %d)\n", x0, x1); return NULL; } + + priv = art_new (ArtRenderPriv, 1); + result = &priv->super; + result->x0 = x0; result->y0 = y0; result->x1 = x1; |