From d190773d09f19d60aaa0c61fa59b72b300c2ca8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Lid=C3=A9n=20Borell?= Date: Sat, 15 Feb 2014 22:38:31 +0000 Subject: [PATCH] Fix memory leak in the test program --- plugins/fishlim/test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/fishlim/test.c b/plugins/fishlim/test.c index 09d19ca3..9158d01c 100644 --- a/plugins/fishlim/test.c +++ b/plugins/fishlim/test.c @@ -46,6 +46,7 @@ static int decrypt(int nick_count, char *nicks[]) { return 1; success: fprintf(stderr, "Decrypted text >>>%s<<<\n", msg); + free(msg); } return 0; } @@ -62,6 +63,7 @@ static int encrypt(int nick_count, char *nicks[]) { char *encrypted = fish_encrypt_for_nick(nicks[i], message); if (encrypted) { fprintf(stderr, "Encrypted [%s]: >>>%s<<<\n", nicks[i], encrypted); + free(encrypted); } else { error = true; }