diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2021-11-15 11:18:39 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2021-11-15 11:18:39 +0100 |
commit | 84a1ac1baf0cdec49a2600f1872337612233ed01 (patch) | |
tree | c576494898964493219b13f833debeea966db012 /src/messenger/messenger_api.c | |
parent | 72d1c2620982a253ad5450d18cc79b3a2b7f21af (diff) | |
download | gnunet-84a1ac1baf0cdec49a2600f1872337612233ed01.tar.gz gnunet-84a1ac1baf0cdec49a2600f1872337612233ed01.zip |
-fixes memory leaks with message body decoding
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/messenger/messenger_api.c')
-rw-r--r-- | src/messenger/messenger_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/messenger/messenger_api.c b/src/messenger/messenger_api.c index ef6244e19..c9b143662 100644 --- a/src/messenger/messenger_api.c +++ b/src/messenger/messenger_api.c | |||
@@ -214,6 +214,7 @@ check_recv_message (void *cls, | |||
214 | if (GNUNET_YES != decode_message (&message, length, buffer, GNUNET_YES, NULL)) | 214 | if (GNUNET_YES != decode_message (&message, length, buffer, GNUNET_YES, NULL)) |
215 | return GNUNET_NO; | 215 | return GNUNET_NO; |
216 | 216 | ||
217 | cleanup_message(&message); | ||
217 | return GNUNET_OK; | 218 | return GNUNET_OK; |
218 | } | 219 | } |
219 | 220 | ||
@@ -259,6 +260,8 @@ handle_recv_message (void *cls, | |||
259 | } | 260 | } |
260 | else | 261 | else |
261 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Room not found\n"); | 262 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Room not found\n"); |
263 | |||
264 | cleanup_message(&message); | ||
262 | } | 265 | } |
263 | 266 | ||
264 | static void | 267 | static void |