summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-31 11:35:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-01 08:57:43 +0200
commit019501e6827e176c70480822725f7fc7b6a59de4 (patch)
tree51d53508b72c876452ea98b151ecd148d13117e8
parent50e743f210f35178b8c21628b023d50bf03e54f9 (diff)
cid#1500502,cid#1500623,cid#1500659 Resource leak
Change-Id: I7025dd3616ab2404a688d50bb25f07d012b52ccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139092 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/o3tl/sorted_vector.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/o3tl/sorted_vector.hxx b/include/o3tl/sorted_vector.hxx
index 13c0b25f8f0e..0f31bc517651 100644
--- a/include/o3tl/sorted_vector.hxx
+++ b/include/o3tl/sorted_vector.hxx
@@ -328,6 +328,7 @@ public:
{
Value tmp(const_cast<typename Value::element_type*>(x));
auto ret = super_sorted_vector::find(tmp);
+ // coverity[ resource_leak : FALSE] - this is only a pretend unique_ptr, to avoid allocating a temporary
tmp.release();
return ret;
}
@@ -338,6 +339,7 @@ public:
{
Value tmp(const_cast<typename Value::element_type*>(x));
auto ret = super_sorted_vector::upper_bound(tmp);
+ // coverity[ resource_leak : FALSE] - this is only a pretend unique_ptr, to avoid allocating a temporary
tmp.release();
return ret;
}
@@ -348,6 +350,7 @@ public:
{
Value tmp(const_cast<typename Value::element_type*>(x));
auto ret = super_sorted_vector::lower_bound(tmp);
+ // coverity[ resource_leak : FALSE] - this is only a pretend unique_ptr, to avoid allocating a temporary
tmp.release();
return ret;
}