Skip to content
Snippets Groups Projects
Commit b085b050 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

vhost-user-scsi: use g_strdup()


Since vhost-user-scsi uses glib.

Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
parent 19409df8
No related branches found
No related tags found
No related merge requests found
......@@ -822,10 +822,10 @@ int main(int argc, char **argv)
case 'h':
goto help;
case 'u':
unix_fn = strdup(optarg);
unix_fn = g_strdup(optarg);
break;
case 'i':
iscsi_uri = strdup(optarg);
iscsi_uri = g_strdup(optarg);
break;
default:
goto help;
......@@ -854,12 +854,8 @@ out:
vdev_scsi_deinit(vdev_scsi);
free(vdev_scsi);
}
if (unix_fn) {
free(unix_fn);
}
if (iscsi_uri) {
free(iscsi_uri);
}
g_free(unix_fn);
g_free(iscsi_uri);
return err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment