From be168af860109a1ecc8526c5bbe0ace1536448b8 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 22 Jan 2013 11:08:04 +0100 Subject: libcacard: Fix unchecked strdup() by converting to g_strdup() Note that we already free with g_free(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- libcacard/vcard_emul_nss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcacard/vcard_emul_nss.c') diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index 5f565e0b4a..df79476db8 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -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) { -- cgit v1.2.1