summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libpiano/crypt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libpiano/crypt.c b/src/libpiano/crypt.c
index 29ad3cb..3f99e93 100644
--- a/src/libpiano/crypt.c
+++ b/src/libpiano/crypt.c
@@ -57,6 +57,7 @@ char *PianoDecryptString (gcry_cipher_hd_t h, const char * const input,
gret = gcry_cipher_decrypt (h, output, outputLen, NULL, 0);
if (gret) {
+ free (output);
return NULL;
}
@@ -82,6 +83,7 @@ char *PianoEncryptString (gcry_cipher_hd_t h, const char *s) {
gret = gcry_cipher_encrypt (h, paddedInput, paddedInputLen, NULL, 0);
if (gret) {
+ free (paddedInput);
return NULL;
}