From 77cc81109229474ccb90fdcfa76569fd7611d921 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 21 Sep 2020 12:20:41 +0100 Subject: [Minor] Add cleanup on error path --- src/libutil/shingles.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libutil') diff --git a/src/libutil/shingles.c b/src/libutil/shingles.c index 4affb16c3..8816e6e3f 100644 --- a/src/libutil/shingles.c +++ b/src/libutil/shingles.c @@ -188,6 +188,8 @@ rspamd_shingles_from_text (GArray *input, g_free (res); } + rspamd_fstring_free (row); + return NULL; } @@ -256,7 +258,12 @@ rspamd_shingles_from_text (GArray *input, g_free (hashes[i]); } + if (pool != NULL) { + g_free (res); + } + g_free (hashes); + rspamd_fstring_free (row); return NULL; } -- cgit v1.2.3