mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-20 00:31:28 +00:00
fix memory leak (1.0.17)
This commit is contained in:
parent
5678c1d37d
commit
7c68ef5418
@ -146,18 +146,19 @@ m_inc(m, size)
|
||||
struct mbuf *m;
|
||||
int size;
|
||||
{
|
||||
int datasize;
|
||||
|
||||
/* some compiles throw up on gotos. This one we can fake. */
|
||||
if(m->m_size>size) return;
|
||||
|
||||
if (m->m_flags & M_EXT) {
|
||||
/* datasize = m->m_data - m->m_ext; */
|
||||
datasize = m->m_data - m->m_ext;
|
||||
m->m_ext = (char *)realloc(m->m_ext,size);
|
||||
/* if (m->m_ext == NULL)
|
||||
* return (struct mbuf *)NULL;
|
||||
*/
|
||||
/* m->m_data = m->m_ext + datasize; */
|
||||
m->m_data = m->m_ext + datasize;
|
||||
} else {
|
||||
int datasize;
|
||||
char *dat;
|
||||
datasize = m->m_data - m->m_dat;
|
||||
dat = (char *)malloc(size);
|
||||
|
Loading…
Reference in New Issue
Block a user