aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-05-02 14:11:27 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-05-02 14:11:27 +0200
commit2336decbe02406e7170024ebf7eddf614b7653d0 (patch)
tree1b170145c96d697915fbc0eb5b9fb3cd00f97b70
parenteo_test_manager_xattr: Fix resource leak (diff)
downloadefl-2336decbe02406e7170024ebf7eddf614b7653d0.tar.gz
eina_test_strbuf: Fix resource leak
Summary: Coverity reports that we leak storage that 'buf' points to because we are reassigning the variable, so lets free the previous strbuf so we don't leak. Fixes CID1400952 @fix Depends on https://phab.enlightenment.org/D8769 Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8770
-rw-r--r--src/tests/eina/eina_test_strbuf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/tests/eina/eina_test_strbuf.c b/src/tests/eina/eina_test_strbuf.c
index a308374790..67f304451d 100644
--- a/src/tests/eina/eina_test_strbuf.c
+++ b/src/tests/eina/eina_test_strbuf.c
@@ -630,7 +630,6 @@ EFL_START_TEST(eina_test_strbuf_strftime_test)
fail_if(str == NULL || strcmp(str, cbuf) != 0);
eina_strbuf_reset(buf);
- buf = eina_strbuf_new();
eina_strbuf_append(buf, "Hours: Minutes");
eina_strbuf_prepend_strftime(buf, "%I ", info);
eina_strbuf_insert_strftime(buf, "%M ", info, 10);