static void bdrv_detach_child(BdrvChild *child)

{

    if (child->next.le_prev) {

        QLIST_REMOVE(child, next);

        child->next.le_prev = NULL;

    }



    bdrv_replace_child(child, NULL, false);



    g_free(child->name);

    g_free(child);

}

static void bdrv_detach_child(BdrvChild *child)

{

    if (child->next.le_prev) {

        QLIST_REMOVE(child, next);

        child->next.le_prev = NULL;

    }



    bdrv_replace_child(child, NULL, false);



    g_free(child->name);

    g_free(child);

}

static void FUNC_0(BdrvChild *VAR_0)

{

    if (VAR_0->next.le_prev) {

        QLIST_REMOVE(VAR_0, next);

        VAR_0->next.le_prev = NULL;

    }



    bdrv_replace_child(VAR_0, NULL, false);



    g_free(VAR_0->name);

    g_free(VAR_0);

}

static void FUNC_0(BdrvChild *VAR_0)
{ if (VAR_0->next.le_prev) { QLIST_REMOVE(VAR_0, next); VAR_0->next.le_prev = NULL; } bdrv_replace_child(VAR_0, NULL, false); g_free(VAR_0->name); g_free(VAR_0); }