summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-24 09:46:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-24 16:34:55 +0000
commite882ff8c160a7341071746bd0d73a020bb423dbc (patch)
treed54531f91bd5f3d0175c3bec6cfdf5ef0bbc853c /solenv
parentd395093aecb9da67d0e38d9b3776d166647fde18 (diff)
coverity#736477 document deliberate Resource leak at detection point
Change-Id: Id9ad1df799c67110a426ee7ce41287703e8bdbfb
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/concat-deps.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index d513430c89b0..aa1deed3ed46 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -909,11 +909,6 @@ char last_ns = 0;
off_t size;
buffer = file_load(fn, &size, &rc);
- /* Note: yes we are going to leak 'buffer'
- * this is on purpose, to avoid cloning the 'key' out of it
- * and our special 'hash' just store the pointer to the key
- * inside of buffer, hence it need to remain allocated
- */
if(!rc)
{
base = cursor_out = cursor = end = buffer;
@@ -1081,6 +1076,12 @@ off_t size;
}
}
}
+ /* Note: yes we are going to leak 'buffer'
+ * this is on purpose, to avoid cloning the 'key' out of it and our special
+ * 'hash' just store the pointer to the key inside of buffer, hence it need
+ * to remain allocated
+ * coverity[leaked_storage] - this is on purpose
+ */
return rc;
}