summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/source/fsys/urlobj.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index b7d3c241ef38..764bb28ef623 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -616,8 +616,10 @@ std::unique_ptr<SvMemoryStream> memoryStream(
new char[length]);
memcpy(b.get(), data, length);
std::unique_ptr<SvMemoryStream> s(
- new SvMemoryStream(b.release(), length, StreamMode::READ));
+ new SvMemoryStream(b.get(), length, StreamMode::READ));
s->ObjectOwnsMemory(true);
+ // coverity[leaked_storage : FALSE] - belongs to SvMemoryStream s at this point
+ b.release();
return s;
}