From 7155b56dc0d5dba9627e9ebb76eef23cc634a331 Mon Sep 17 00:00:00 2001 From: Gichan Jang Date: Mon, 24 May 2021 13:30:40 +0900 Subject: [PATCH] [TEST] Fix unittest util function Fix possible double free case. Signed-off-by: Gichan Jang --- tests/unittest_util.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unittest_util.h b/tests/unittest_util.h index ca48028..0619403 100644 --- a/tests/unittest_util.h +++ b/tests/unittest_util.h @@ -64,8 +64,10 @@ extern gboolean wait_pipeline_process_buffers (const guint * data_received, guin EXPECT_GE (timeout_ms, timer); \ break; \ } \ - if (len < exp_len) \ + if (len < exp_len) { \ g_free (content); \ + content = NULL; \ + } \ } while (len < exp_len); \ } while (0) -- 2.7.4