mikmod_reader: Possible null pointer dereference:

gst_reader variable is being used before actually checking if it
allocated properly

https://bugzilla.gnome.org/show_bug.cgi?id=751306
This commit is contained in:
Vineeth T M 2015-06-22 19:30:58 +09:00 committed by Luis de Bethencourt
parent 2663388000
commit 5828713771

View file

@ -90,10 +90,12 @@ GST_READER_new (GstMikMod * mik)
GST_READER *gst_reader;
gst_reader = (GST_READER *) g_malloc (sizeof (GST_READER));
if (gst_reader) {
gst_reader->offset = 0;
gst_reader->eof = 0;
gst_reader->mik = mik;
if (gst_reader) {
gst_reader->core.Eof = &GST_READER_Eof;
gst_reader->core.Read = &GST_READER_Read;
gst_reader->core.Get = &GST_READER_Get;