summaryrefslogtreecommitdiff
path: root/src/core/core-secure.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core-secure.c')
-rw-r--r--src/core/core-secure.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/core/core-secure.c b/src/core/core-secure.c
index 66abab5c8..9b29b6641 100644
--- a/src/core/core-secure.c
+++ b/src/core/core-secure.c
@@ -251,10 +251,8 @@ encrypt_end:
gcry_cipher_close (*hd_cipher);
free (hd_cipher);
}
- if (key)
- free (key);
- if (hash_and_data)
- free (hash_and_data);
+ free (key);
+ free (hash_and_data);
return rc;
}
@@ -403,10 +401,8 @@ decrypt_end:
gcry_cipher_close (*hd_cipher);
free (hd_cipher);
}
- if (key)
- free (key);
- if (decrypted_hash_data)
- free (decrypted_hash_data);
+ free (key);
+ free (decrypted_hash_data);
return rc;
}
@@ -484,8 +480,7 @@ secure_decrypt_data_not_decrypted (const char *passphrase)
keys[i]);
num_ok++;
}
- if (decrypted)
- free (decrypted);
+ free (decrypted);
free (buffer);
}
}