Skip to content

Commit

Permalink
tests: fix memory leak in pl_ycbcr_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 committed Feb 12, 2023
1 parent 6c30dde commit ce6f962
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/gpu_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -1379,10 +1379,6 @@ static struct pl_hook_res noop_hook(void *priv, const struct pl_hook_params *par

static void pl_ycbcr_tests(pl_gpu gpu)
{
pl_renderer rr = pl_renderer_create(gpu->log, gpu);
if (!rr)
return;

struct pl_plane_data data[3];
for (int i = 0; i < 3; i++) {
const int sub = i > 0 ? 1 : 0;
Expand All @@ -1406,6 +1402,10 @@ static void pl_ycbcr_tests(pl_gpu gpu)
if (!fmt || (fmt->caps & caps) != caps)
return;

pl_renderer rr = pl_renderer_create(gpu->log, gpu);
if (!rr)
return;

pl_tex src_tex[3] = {0};
pl_tex dst_tex[3] = {0};
struct pl_frame img = {
Expand Down

0 comments on commit ce6f962

Please sign in to comment.