summaryrefslogtreecommitdiff
path: root/libcacard/vscclient.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-01-22 11:08:04 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-30 11:14:46 +0100
commitbe168af860109a1ecc8526c5bbe0ace1536448b8 (patch)
treeacb0700408c43b8205cff101ded58b1aa5ba62b3 /libcacard/vscclient.c
parent40a50b0a73d185c85cf62023f07e3091861081bb (diff)
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>
Diffstat (limited to 'libcacard/vscclient.c')
-rw-r--r--libcacard/vscclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index 2fce52bed5..9b744f249c 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -503,8 +503,8 @@ main(
command_line_options = vcard_emul_options(emul_args);
}
- qemu_host = strdup(argv[argc - 2]);
- qemu_port = strdup(argv[argc - 1]);
+ qemu_host = g_strdup(argv[argc - 2]);
+ qemu_port = g_strdup(argv[argc - 1]);
sock = connect_to_qemu(qemu_host, qemu_port);
if (sock == -1) {
fprintf(stderr, "error opening socket, exiting.\n");