From 886fea58bd68ebfd1a0cd7db5630cc91176f39c0 Mon Sep 17 00:00:00 2001 From: Andrey Skvortsov Date: Thu, 29 May 2025 00:08:38 +0300 Subject: [PATCH] zbar_pipeline: fix memory leak, when pixel format is unsupported --- src/zbar_pipeline.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zbar_pipeline.c b/src/zbar_pipeline.c index 849015a..59d5c4c 100644 --- a/src/zbar_pipeline.c +++ b/src/zbar_pipeline.c @@ -241,6 +241,8 @@ process_image(MPPipeline *pipeline, MPZBarImage **_image) break; default: printf("Preview pixel format not supported - zbar won't work\n"); + free(data); + mp_zbar_image_unref(image); return; }