summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@kodafritt.se>2014-02-15 22:38:31 +0000
committerBerke Viktor <github.bviktor@outlook.com>2014-06-02 23:49:42 +0200
commitd190773d09f19d60aaa0c61fa59b72b300c2ca8e (patch)
treee8437d14c371f242e58dfa7c6f8210a40822bad5
parentd8c80cd277b2f6b3e7955e95d7845f83b89838c6 (diff)
Fix memory leak in the test program
-rw-r--r--plugins/fishlim/test.c2
1 files changed, 2 insertions, 0 deletions
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;
             }