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 D8769

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8770
This commit is contained in:
Christopher Michael 2019-05-02 14:11:27 +02:00 committed by Xavi Artigas
parent 1e0a206f6e
commit 2336decbe0
1 changed files with 0 additions and 1 deletions

View File

@ -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);