void bdrv_delete(BlockDriverState *bs)

{

    assert(!bs->peer);



    /* remove from list, if necessary */

    bdrv_make_anon(bs);



    bdrv_close(bs);

    if (bs->file != NULL) {

        bdrv_delete(bs->file);

    }



    assert(bs != bs_snapshots);

    g_free(bs);

}

void bdrv_delete(BlockDriverState *bs)

{

    assert(!bs->peer);



    

    bdrv_make_anon(bs);



    bdrv_close(bs);

    if (bs->file != NULL) {

        bdrv_delete(bs->file);

    }



    assert(bs != bs_snapshots);

    g_free(bs);

}

void FUNC_0(BlockDriverState *VAR_0)

{

    assert(!VAR_0->peer);



    

    bdrv_make_anon(VAR_0);



    bdrv_close(VAR_0);

    if (VAR_0->file != NULL) {

        FUNC_0(VAR_0->file);

    }



    assert(VAR_0 != bs_snapshots);

    g_free(VAR_0);

}

void FUNC_0(BlockDriverState *VAR_0)
{ assert(!VAR_0->peer); bdrv_make_anon(VAR_0); bdrv_close(VAR_0); if (VAR_0->file != NULL) { FUNC_0(VAR_0->file); } assert(VAR_0 != bs_snapshots); g_free(VAR_0); }