diff options
author | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
commit | ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db (patch) | |
tree | e121e6c1e25ff47a26090437c937b022d2bfebc6 /src/common/socket.c | |
parent | dc6b470e4aaf252cb4f960b8b5585e51da821893 (diff) | |
parent | f70d54001cd1b975db6f4668a6d54dbae7a8ac92 (diff) | |
download | hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.gz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.bz2 hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.xz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.zip |
Merge pull request #425 from 4144/fixes
Different fixes after automatic checks
Diffstat (limited to 'src/common/socket.c')
-rw-r--r-- | src/common/socket.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index 09521c312..c0864c9b3 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -633,14 +633,16 @@ static void delete_session(int fd) aFree(session[fd]->wdata); if( session[fd]->session_data ) aFree(session[fd]->session_data); - for(i = 0; i < session[fd]->hdatac; i++) { - if( session[fd]->hdata[i]->flag.free ) { - aFree(session[fd]->hdata[i]->data); - } - aFree(session[fd]->hdata[i]); - } if( session[fd]->hdata ) + { + for(i = 0; i < session[fd]->hdatac; i++) { + if( session[fd]->hdata[i]->flag.free ) { + aFree(session[fd]->hdata[i]->data); + } + aFree(session[fd]->hdata[i]); + } aFree(session[fd]->hdata); + } aFree(session[fd]); session[fd] = NULL; } |