diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-18 12:15:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-18 16:05:39 +0200 |
commit | 1b3d662f291d10e42232f9f842affe5ad35035f0 (patch) | |
tree | 3192e7feaf8a201e4c1d119800aaf3c626df04f1 /tools | |
parent | 6105706deb71aa134f2f754aed6f50daf3b8d620 (diff) |
cid#1500387 alternative silence Resource leak
This reverts commit d40bfecddcac38006ee989d8072fb2b453cf6b9f for
a different approach
Change-Id: I8e058efbff214456b91346ce16e7eba7a89a8a53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138480
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 4 |
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; } |