diff options
| author | Gleb Natapov | 2011-02-02 16:34:34 +0100 |
|---|---|---|
| committer | Aurelien Jarno | 2011-02-04 21:21:41 +0100 |
| commit | 4fef930af8d7fab4b6c777fa4c6e2b902359262a (patch) | |
| tree | 8119a5198bbb8ca519e62ef778e5a447f462456b | |
| parent | Set the right overflow bit for neon 32 and 64 bit saturating add/sub. (diff) | |
| download | qemu-4fef930af8d7fab4b6c777fa4c6e2b902359262a.tar.gz qemu-4fef930af8d7fab4b6c777fa4c6e2b902359262a.tar.xz qemu-4fef930af8d7fab4b6c777fa4c6e2b902359262a.zip | |
do not pass NULL to strdup.
Also use qemu_strdup() instead of strdup() in bootindex code.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
| -rw-r--r-- | vl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -738,7 +738,7 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev, node = qemu_mallocz(sizeof(FWBootEntry)); node->bootindex = bootindex; - node->suffix = strdup(suffix); + node->suffix = suffix ? qemu_strdup(suffix) : NULL; node->dev = dev; QTAILQ_FOREACH(i, &fw_boot_order, link) { @@ -785,7 +785,7 @@ char *get_boot_devices_list(uint32_t *size) } else if (devpath) { bootpath = devpath; } else { - bootpath = strdup(i->suffix); + bootpath = qemu_strdup(i->suffix); assert(bootpath); } |
