mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
libcacard: Drop superfluous conditionals around g_free()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
6b1dd54b6a
commit
ec15993d9d
5 changed files with 12 additions and 32 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue