diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-26 14:49:21 -0400 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-11-06 09:36:57 -0500 |
commit | 6f1ddc726f0763cd9cc271e33ba0769d821d74da (patch) | |
tree | 4c0a06b5a6163d722f10ac395008be78a176d465 | |
parent | b456ece55731c545d0bf62641fee2da437861987 (diff) | |
download | ffmpeg-6f1ddc726f0763cd9cc271e33ba0769d821d74da.tar.gz |
avdevice/dshow_enummediatypes: check return of av_malloc
Untested.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
-rw-r--r-- | libavdevice/dshow_enummediatypes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/dshow_enummediatypes.c b/libavdevice/dshow_enummediatypes.c index 5b69a5b742..3a66a4de14 100644 --- a/libavdevice/dshow_enummediatypes.c +++ b/libavdevice/dshow_enummediatypes.c @@ -37,6 +37,8 @@ libAVEnumMediaTypes_Next(libAVEnumMediaTypes *this, unsigned long n, if (!this->pos && n == 1) { if (!IsEqualGUID(&this->type.majortype, &GUID_NULL)) { AM_MEDIA_TYPE *type = av_malloc(sizeof(AM_MEDIA_TYPE)); + if (!type) + return E_OUTOFMEMORY; ff_copy_dshow_media_type(type, &this->type); *types = type; count = 1; |