Commit c1fa6be4 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

winegstreamer: Fix a memory leak (Coverity).

video_format can be leaked when encountering an invalid WMV format.
parent 93db373c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment