[PATCH v3] ole32: Don't free handles that are just copied in the inproc case.

Serge Gautherie winehq-git_serge_180711 at gautherie.fr
Thu Dec 13 06:23:47 CST 2018


Would it make sense to swap case order and merge/fallthrough?


On 13/12/2018 10:39, Huw Davies wrote:

> -    ReleaseStgMedium(pStgMedium);
> +    switch (med->tymed)
> +    {
> +    case TYMED_NULL:
> +    case TYMED_FILE:
> +    case TYMED_ISTREAM:
> +    case TYMED_ISTORAGE:
> +        ReleaseStgMedium(med);
> +        break;
> +    case TYMED_HGLOBAL:
> +    case TYMED_GDI:
> +    case TYMED_MFPICT:
> +    case TYMED_ENHMF:
> +        if (LOWORD(*flags) == MSHCTX_INPROC)
> +            med->tymed = TYMED_NULL;
> +        ReleaseStgMedium(med);
> +        break;
> +    default:
> +        RaiseException(DV_E_TYMED, 0, 0, NULL);
> +    }

-- 



More information about the wine-devel mailing list