/* Frees a option list. If it contains strings, the strings are freed as well.  */
void free_option_parameters(QEMUOptionParameter *list)
/* Frees a option list. If it contains strings, the strings are freed as well.  */
void free_option_parameters(QEMUOptionParameter *list)
{
    QEMUOptionParameter *cur = list;
    while (cur && cur->name) {
        if (cur->type == OPT_STRING) {
            g_free(cur->value.s);
        }
        cur++;
    }
    g_free(list);
}