Fix to #473, http://bugs.skysql.com/show_bug.cgi?id=473

Several memory issues. Read the code.
In general one-off hint is only added to gwbuf and freed in gwbuf_free. Stacked hint is copied to stack and to gwbuf. gwbuf is freed after routing but stacked hint is freed either in stop or when session is closed. All this applies to named hint as well except that in addition, it has one more copy in named hint struct which is emptied when session is closed.
This commit is contained in:
VilhoRaatikka
2014-08-08 01:28:07 +03:00
parent 183428c48b
commit 86a4c3ba90
7 changed files with 208 additions and 24 deletions

View File

@ -1404,7 +1404,6 @@ static int route_by_statement(SESSION *session, GWBUF *readbuf)
int rc = -1;
GWBUF* packetbuf;
#if defined(SS_DEBUG)
gwbuf_type_t prevtype;
GWBUF* tmpbuf;
tmpbuf = readbuf;