mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 05:51:36 +00:00
mv strdup to qemu_strdup in vl.c
There are few places in vl.c not using the qemu version of malloc/free/strdup. Fix it. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
321c1cb10b
commit
73ffc805a2
6
vl.c
6
vl.c
@ -858,7 +858,7 @@ static void configure_alarms(char const *opt)
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
arg = strdup(opt);
|
arg = qemu_strdup(opt);
|
||||||
|
|
||||||
/* Reorder the array */
|
/* Reorder the array */
|
||||||
name = strtok(arg, ",");
|
name = strtok(arg, ",");
|
||||||
@ -887,7 +887,7 @@ next:
|
|||||||
name = strtok(NULL, ",");
|
name = strtok(NULL, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
free(arg);
|
qemu_free(arg);
|
||||||
|
|
||||||
if (cur) {
|
if (cur) {
|
||||||
/* Disable remaining timers */
|
/* Disable remaining timers */
|
||||||
@ -4686,7 +4686,7 @@ char *qemu_find_file(int type, const char *name)
|
|||||||
/* If name contains path separators then try it as a straight path. */
|
/* If name contains path separators then try it as a straight path. */
|
||||||
if ((strchr(name, '/') || strchr(name, '\\'))
|
if ((strchr(name, '/') || strchr(name, '\\'))
|
||||||
&& access(name, R_OK) == 0) {
|
&& access(name, R_OK) == 0) {
|
||||||
return strdup(name);
|
return qemu_strdup(name);
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case QEMU_FILE_TYPE_BIOS:
|
case QEMU_FILE_TYPE_BIOS:
|
||||||
|
Loading…
Reference in New Issue
Block a user