diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2020-02-25 10:36:39 +0100 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2020-02-25 16:43:20 +0100 |
commit | 2248e84a4bdae0302a69346b1b6fecbcd6a81534 (patch) | |
tree | 6d26a77d3f637b94fec217159fb221b9657b5949 | |
parent | fa562828b8d08fa4e6902b061e8bb8bda430b8a7 (diff) | |
download | efl-2248e84a4bdae0302a69346b1b6fecbcd6a81534.tar.gz |
exactness: inspect: fix memory leak of buffer in error path
If we hit this error path we need to release the allocated buffer.
CID: 1419878
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11407
-rw-r--r-- | src/bin/exactness/inspect.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/exactness/inspect.c b/src/bin/exactness/inspect.c index 64f5d1760f..7a119034b0 100644 --- a/src/bin/exactness/inspect.c +++ b/src/bin/exactness/inspect.c @@ -357,7 +357,11 @@ _scn_text_get(void *data, Evas_Object *gl, const char *part EINA_UNUSED) Exactness_Action *a1 = vv->p1; Exactness_Action *a2 = vv->p2; - if (!a1 ^ !a2) return strdup("XXXXX"); + if (!a1 ^ !a2) + { + eina_strbuf_free(buf); + return strdup("XXXXX"); + } if (a1->delay_ms != a2->delay_ms) eina_strbuf_append_printf(buf, "[+"LDIFF(%.3f)"/+"RDIFF(%.3f)"]: ", a1->delay_ms/1000.0, a2->delay_ms/1000.0); else eina_strbuf_append_printf(buf, "+%.3f: ", a1->delay_ms / 1000.0); |