mirror of https://github.com/xqemu/xqemu.git
mv from strdup to qemu_strdup in qemu-option.c
one place is using strdup() instead of qemu_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
73ffc805a2
commit
d4c3fddd1f
|
@ -274,7 +274,7 @@ int set_option_parameter(QEMUOptionParameter *list, const char *name,
|
||||||
|
|
||||||
case OPT_STRING:
|
case OPT_STRING:
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
list->value.s = strdup(value);
|
list->value.s = qemu_strdup(value);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Option '%s' needs a parameter\n", name);
|
fprintf(stderr, "Option '%s' needs a parameter\n", name);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -334,12 +334,12 @@ void free_option_parameters(QEMUOptionParameter *list)
|
||||||
|
|
||||||
while (cur && cur->name) {
|
while (cur && cur->name) {
|
||||||
if (cur->type == OPT_STRING) {
|
if (cur->type == OPT_STRING) {
|
||||||
free(cur->value.s);
|
qemu_free(cur->value.s);
|
||||||
}
|
}
|
||||||
cur++;
|
cur++;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(list);
|
qemu_free(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue