From d40bfecddcac38006ee989d8072fb2b453cf6b9f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 16 Aug 2022 12:25:27 +0100 Subject: cid#1500387 silence Resource leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I847e2be95ad0c56246279e25ac3081967f8f6855 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138393 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- tools/source/fsys/urlobj.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 2b5a191d67c3..b7d3c241ef38 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -616,9 +616,8 @@ std::unique_ptr memoryStream( new char[length]); memcpy(b.get(), data, length); std::unique_ptr s( - new SvMemoryStream(b.get(), length, StreamMode::READ)); + new SvMemoryStream(b.release(), length, StreamMode::READ)); s->ObjectOwnsMemory(true); - b.release(); return s; } -- cgit