aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/virtio-9p-device.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-01-22 11:07:58 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-30 11:14:46 +0100
commitd3f8e138c23ba082f87c96634d06b978473c1e9b (patch)
tree349324b5623a40e7f224dd1fb211b6536fb5f777 /hw/9pfs/virtio-9p-device.c
parentc64f50d1e250879611e6f328e2c4fb18c8a4ab0c (diff)
downloadqemu-d3f8e138c23ba082f87c96634d06b978473c1e9b.zip
qemu-d3f8e138c23ba082f87c96634d06b978473c1e9b.tar.gz
qemu-d3f8e138c23ba082f87c96634d06b978473c1e9b.tar.bz2
hw/9pfs: Fix unchecked strdup() by converting to g_strdup()
Note: the allocation in virtio_9p_init() is still leaked. To be fixed in a followup commit. 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 'hw/9pfs/virtio-9p-device.c')
-rw-r--r--hw/9pfs/virtio-9p-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 6eab7f7..74155fb 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -94,7 +94,7 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf)
exit(1);
}
- s->tag = strdup(conf->tag);
+ s->tag = g_strdup(conf->tag);
s->ctx.uid = -1;
s->ops = fse->ops;