summaryrefslogtreecommitdiff
path: root/src/libpiano
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2012-09-21 18:11:18 +0200
committerLars-Dominik Braun <lars@6xq.net>2012-09-21 18:11:18 +0200
commitfe1ffbd7257b4c0dd43a825912bcd65732df6db2 (patch)
treeb7fbb443deec9d6194c03523a55864abaccf78f9 /src/libpiano
parente3d8f497baaf02daeddb060cd986681d0ee208de (diff)
downloadpianobar-windows-fe1ffbd7257b4c0dd43a825912bcd65732df6db2.tar.gz
pianobar-windows-fe1ffbd7257b4c0dd43a825912bcd65732df6db2.tar.bz2
pianobar-windows-fe1ffbd7257b4c0dd43a825912bcd65732df6db2.zip
piano: Fix memory leak pointed out by clang
Diffstat (limited to 'src/libpiano')
-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;
}