winegstreamer: Fix a memory leak (Coverity).
video_format can be leaked when encountering an invalid WMV format.
This commit is contained in:
parent
93db373c28
commit
c1fa6be453
1 changed files with 3 additions and 3 deletions
|
@ -625,9 +625,6 @@ static bool amt_from_wg_format_video_wmv(AM_MEDIA_TYPE *mt, const struct wg_form
|
|||
uint32_t frame_time;
|
||||
const GUID *subtype;
|
||||
|
||||
if (!(video_format = CoTaskMemAlloc(sizeof(*video_format))))
|
||||
return false;
|
||||
|
||||
switch (format->u.video_wmv.format)
|
||||
{
|
||||
case WG_WMV_VIDEO_FORMAT_WMV1:
|
||||
|
@ -650,6 +647,9 @@ static bool amt_from_wg_format_video_wmv(AM_MEDIA_TYPE *mt, const struct wg_form
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!(video_format = CoTaskMemAlloc(sizeof(*video_format))))
|
||||
return false;
|
||||
|
||||
mt->majortype = MEDIATYPE_Video;
|
||||
mt->subtype = *subtype;
|
||||
mt->bFixedSizeSamples = FALSE;
|
||||
|
|
Loading…
Add table
Reference in a new issue