Author: Adam <git@apiote.tk>
free memory on errors
meowsum.c | 1 +
diff --git a/meowsum.c b/meowsum.c index df5b7b67a0c583824ba9b045805023f0a56cbbae..991c5153faa563fce472563047c046bd919bae60 100644 --- a/meowsum.c +++ b/meowsum.c @@ -155,6 +155,7 @@ } hex_hash = format_sum(*hash, hash_size); if (hex_hash == NULL) { printf("error while formating hex hash for %s\n", argv[i]); + free(hash); return false; }