]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stream_interface: call si_data_close() before releasing the si
authorWilly Tarreau <w@1wt.eu>
Mon, 21 May 2012 16:05:40 +0000 (18:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 21 May 2012 16:07:11 +0000 (18:07 +0200)
This will ensure that the data layer releases anything previously allocated.

src/session.c
src/sock_raw.c
src/stream_interface.c

index 6db9f31c546be8ba5c5666ef7e06c7f83f61aebd..7bc2248d1b54132009d68c8c5cb9505a8b008fd7 100644 (file)
@@ -545,6 +545,7 @@ static int sess_update_st_con_tcp(struct session *s, struct stream_interface *si
                si->flags &= ~SI_FL_CAP_SPLICE;
                fd_delete(si_fd(si));
 
+               si_data_close(si);
                if (si->release)
                        si->release(si);
 
index 213d46972ca427ea9ea418ad6ef630f5d8c0ad6e..5194ea441ba4652b52442fe44c10c968f6b61db6 100644 (file)
@@ -811,6 +811,7 @@ static void sock_raw_shutw(struct stream_interface *si)
        case SI_ST_TAR:
                si->state = SI_ST_DIS;
 
+               si_data_close(si);
                if (si->release)
                        si->release(si);
        default:
@@ -845,6 +846,7 @@ static void sock_raw_shutr(struct stream_interface *si)
                si->state = SI_ST_DIS;
                si->exp = TICK_ETERNITY;
 
+               si_data_close(si);
                if (si->release)
                        si->release(si);
                return;
index c2f7b94f49c55ab392b31d3dd6b7cdd87eb16555..ceed602743492fd2db2c54fb5133524710c22756 100644 (file)
@@ -227,6 +227,7 @@ static void stream_int_shutr(struct stream_interface *si)
                si->state = SI_ST_DIS;
                si->exp = TICK_ETERNITY;
 
+               si_data_close(si);
                if (si->release)
                        si->release(si);
        }
@@ -263,6 +264,7 @@ static void stream_int_shutw(struct stream_interface *si)
                si->state = SI_ST_DIS;
                /* fall through */
 
+               si_data_close(si);
                if (si->release)
                        si->release(si);
        default: