Previous 15994 Revisions Next

r14513 Saturday 18th February, 2012 at 16:16:13 UTC by Miodrag Milanović
Fixed cdrom_file allocation, it contains classes so can't be allocated by malloc this fix crash opeining CUE file directly from MESS (no whatsnew)
[src/lib/util]cdrom.c

src/lib/util/cdrom.c
r14512r14513
119119   UINT32 physofs;
120120
121121   /* allocate memory for the CD-ROM file */
122   file = (cdrom_file *)malloc(sizeof(cdrom_file));
122   file = new cdrom_file();
123123   if (file == NULL)
124124      return NULL;
125125
r14512r14513
208208   err = cdrom_parse_metadata(chd, &file->cdtoc);
209209   if (err != CHDERR_NONE)
210210   {
211      free(file);
211      delete(file);
212212      return NULL;
213213   }
214214
r14512r14513
263263      }
264264   }
265265
266   free(file);
266   delete(file);
267267}
268268
269269

Previous 15994 Revisions Next


© 1998-2018 The MESS Team