summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-16 12:25:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-17 09:53:04 +0200
commitd40bfecddcac38006ee989d8072fb2b453cf6b9f (patch)
treee49f526b9090949786d20226b1fad7e8e8a11824 /tools
parent3c6f95dd327ee0730e90f90b56b5a3dd2a2291fb (diff)
cid#1500387 silence Resource leak
Change-Id: I847e2be95ad0c56246279e25ac3081967f8f6855 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138393 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/fsys/urlobj.cxx3
1 files changed, 1 insertions, 2 deletions
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<SvMemoryStream> memoryStream(
new char[length]);
memcpy(b.get(), data, length);
std::unique_ptr<SvMemoryStream> s(
- new SvMemoryStream(b.get(), length, StreamMode::READ));
+ new SvMemoryStream(b.release(), length, StreamMode::READ));
s->ObjectOwnsMemory(true);
- b.release();
return s;
}