Add GWBUF_POINTER_IN_BUFFER macro; add extra free calls to remove memory leaks.

This commit is contained in:
counterpoint
2015-09-22 11:54:47 +01:00
parent 15f042f083
commit 95a4daecc9
3 changed files with 16 additions and 0 deletions

View File

@ -817,6 +817,10 @@ int gw_read_client_event(
"Session will be closed.")));
}
rc = 1;
while (read_buffer)
{
read_buffer = gwbuf_consume(read_buffer, GWBUF_LENGTH(read_buffer));
}
goto return_rc;
}
}
@ -828,6 +832,10 @@ int gw_read_client_event(
2,
0,
"failed to create new session");
while (read_buffer)
{
read_buffer = gwbuf_consume(read_buffer, GWBUF_LENGTH(read_buffer));
}
return 0;
}
}
@ -1204,6 +1212,10 @@ int gw_read_client_event(
"Session will be closed.")));
}
while (read_buffer)
{
read_buffer = gwbuf_consume(read_buffer, GWBUF_LENGTH(read_buffer));
}
}
}
}