From: Serge Gautherie Subject: Re: [PATCH v3] ole32: Don't free handles that are just copied in the inproc case. Message-Id: <5C124F53.8090306@gautherie.fr> Date: Thu, 13 Dec 2018 13:23:47 +0100 In-Reply-To: <20181213093918.91783-1-huw@codeweavers.com> References: <20181213093918.91783-1-huw@codeweavers.com> 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); > + } --