MEDIUM: stream_interface: call si_data_close() before releasing the si

This will ensure that the data layer releases anything previously allocated.
This commit is contained in:
Willy Tarreau 2012-05-21 18:05:40 +02:00
parent 24208275d5
commit 4da69a91a0
3 changed files with 5 additions and 0 deletions

View 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);

View 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;

View 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: