Thread: C++ and MAME
View Single Post
Old 08-08-2014, 08:08 PM   #6
Seahawk's Avatar
Regular Poster
4,154 posts
Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!Seahawk has earned the ear of the admin. Watch yourself!
View Stats
 
Seahawk

Re: C++ and MAME

You should check that p2 is not a null pointer after the call to malloc. If the call to malloc fails then p2 is assigned null and the function returns it, causing newbuff to be null as well. The pointer p is also lost.
Reply With Quote