mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 15:21:29 +02:00
MINOR: cli: do not call the release handler on internal error.
It's dangerous to call this on internal state error, because it risks to perform a double-free. This can only happen when a state is not handled. Note that the switch/case currently doesn't offer any option for missed states since they're all declared. Better fix this anyway. The fix was tested by commenting out some entries in the switch/case.
This commit is contained in:
parent
c9e930accc
commit
5cfa3bcc22
@ -2554,8 +2554,7 @@ static void cli_io_handler(struct appctx *appctx)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default: /* abnormal state */
|
default: /* abnormal state */
|
||||||
cli_release_handler(appctx);
|
si->flags |= SI_FL_ERR;
|
||||||
appctx->st0 = STAT_CLI_PROMPT;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user