aboutsummaryrefslogtreecommitdiff
path: root/libcacard/cac.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-06-06 18:32:08 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2014-06-10 19:39:34 +0400
commitec15993d9d7ea7108101f068c9929a62be29dc67 (patch)
treeb959195b260146cb5416f4123ffb8506a5a6a053 /libcacard/cac.c
parent6b1dd54b6a4652a3a1e15a4beacd3be554a9ade1 (diff)
libcacard: Drop superfluous conditionals around g_free()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'libcacard/cac.c')
-rw-r--r--libcacard/cac.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libcacard/cac.c b/libcacard/cac.c
index 0a0163d3eb..ae8c3784b9 100644
--- a/libcacard/cac.c
+++ b/libcacard/cac.c
@@ -100,10 +100,8 @@ cac_applet_pki_reset(VCard *card, int channel)
pki_applet = &(applet_private->u.pki_data);
pki_applet->cert_buffer = NULL;
- if (pki_applet->sign_buffer) {
- g_free(pki_applet->sign_buffer);
- pki_applet->sign_buffer = NULL;
- }
+ g_free(pki_applet->sign_buffer);
+ pki_applet->sign_buffer = NULL;
pki_applet->cert_buffer_len = 0;
pki_applet->sign_buffer_len = 0;
return VCARD_DONE;
@@ -285,12 +283,8 @@ cac_delete_pki_applet_private(VCardAppletPrivate *applet_private)
return;
}
pki_applet_data = &(applet_private->u.pki_data);
- if (pki_applet_data->cert != NULL) {
- g_free(pki_applet_data->cert);
- }
- if (pki_applet_data->sign_buffer != NULL) {
- g_free(pki_applet_data->sign_buffer);
- }
+ g_free(pki_applet_data->cert);
+ g_free(pki_applet_data->sign_buffer);
if (pki_applet_data->key != NULL) {
vcard_emul_delete_key(pki_applet_data->key);
}