diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-21 12:20:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-09-21 12:20:41 +0100 |
commit | 77cc81109229474ccb90fdcfa76569fd7611d921 (patch) | |
tree | 7909be4eb02faa9d0c6028854940e38c952f7734 /src/libutil | |
parent | 9ce8ae98039f5cdbb243872552be3c0e3fdd0ecc (diff) | |
download | rspamd-77cc81109229474ccb90fdcfa76569fd7611d921.tar.gz rspamd-77cc81109229474ccb90fdcfa76569fd7611d921.zip |
[Minor] Add cleanup on error path
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/shingles.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |