From 7351b2aff623d90d56624ad99496d4a78c5ec4d0 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 2 Dec 2021 02:44:38 -0500 Subject: [PATCH] [oiio] plug memory leak in oiio_destroy, thanks ASAN! #2402 --- src/media/oiio.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/media/oiio.cpp b/src/media/oiio.cpp index 00a056b35..2668e0715 100644 --- a/src/media/oiio.cpp +++ b/src/media/oiio.cpp @@ -191,6 +191,10 @@ auto ncvisual_rotate(ncvisual* ncv, double rads) -> int { auto oiio_destroy(ncvisual* ncv) -> void { if(ncv){ oiio_details_destroy(ncv->details); + if(ncv->owndata){ + free(ncv->data); + } + delete ncv; } }