mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
libcacard: Fix unchecked strdup() by converting to g_strdup()
Note that we already free with g_free(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
40a50b0a73
commit
be168af860
3 changed files with 5 additions and 5 deletions
|
@ -454,7 +454,7 @@ vreader_emul_new(PK11SlotInfo *slot, VCardEmulType type, const char *params)
|
|||
|
||||
new_reader_emul->slot = PK11_ReferenceSlot(slot);
|
||||
new_reader_emul->default_type = type;
|
||||
new_reader_emul->type_params = strdup(params);
|
||||
new_reader_emul->type_params = g_strdup(params);
|
||||
new_reader_emul->present = PR_FALSE;
|
||||
new_reader_emul->series = 0;
|
||||
new_reader_emul->saved_vcard = NULL;
|
||||
|
@ -997,7 +997,7 @@ vcard_emul_init(const VCardEmulOptions *options)
|
|||
/* We should control this with options. For now we mirror out any
|
||||
* removable hardware slot */
|
||||
default_card_type = options->hw_card_type;
|
||||
default_type_params = strdup(options->hw_type_params);
|
||||
default_type_params = g_strdup(options->hw_type_params);
|
||||
|
||||
SECMOD_GetReadLock(module_lock);
|
||||
for (mlp = module_list; mlp; mlp = mlp->next) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue