mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -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
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue