aboutsummaryrefslogtreecommitdiff
path: root/libcacard/card_7816.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/card_7816.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/card_7816.c')
-rw-r--r--libcacard/card_7816.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libcacard/card_7816.c b/libcacard/card_7816.c
index a54f88039..814fa1662 100644
--- a/libcacard/card_7816.c
+++ b/libcacard/card_7816.c
@@ -172,16 +172,12 @@ vcard_response_delete(VCardResponse *response)
switch (response->b_type) {
case VCARD_MALLOC:
/* everything was malloc'ed */
- if (response->b_data) {
- g_free(response->b_data);
- }
+ g_free(response->b_data);
g_free(response);
break;
case VCARD_MALLOC_DATA:
/* only the data buffer was malloc'ed */
- if (response->b_data) {
- g_free(response->b_data);
- }
+ g_free(response->b_data);
break;
case VCARD_MALLOC_STRUCT:
/* only the structure was malloc'ed */
@@ -358,9 +354,7 @@ vcard_apdu_delete(VCardAPDU *apdu)
if (apdu == NULL) {
return;
}
- if (apdu->a_data) {
- g_free(apdu->a_data);
- }
+ g_free(apdu->a_data);
g_free(apdu);
}