mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-10-28 06:15:38 +00:00
Fix memory leak in the test program
This commit is contained in:
1 parent
d8c80cd277
commit
d190773d09
1 file changed
+2
@@ -46,6 +46,7 @@ static int decrypt(int nick_count, char *nicks[]) {
|
|||||||
return 1;
|
return 1;
|
||||||
success:
|
success:
|
||||||
fprintf(stderr, "Decrypted text >>>%s<<<\n", msg);
|
fprintf(stderr, "Decrypted text >>>%s<<<\n", msg);
|
||||||
|
free(msg);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -62,6 +63,7 @@ static int encrypt(int nick_count, char *nicks[]) {
|
|||||||
char *encrypted = fish_encrypt_for_nick(nicks[i], message);
|
char *encrypted = fish_encrypt_for_nick(nicks[i], message);
|
||||||
if (encrypted) {
|
if (encrypted) {
|
||||||
fprintf(stderr, "Encrypted [%s]: >>>%s<<<\n", nicks[i], encrypted);
|
fprintf(stderr, "Encrypted [%s]: >>>%s<<<\n", nicks[i], encrypted);
|
||||||
|
free(encrypted);
|
||||||
} else {
|
} else {
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user