From: Simon Horman Date: Fri, 15 Jul 2011 04:14:06 +0000 (+0900) Subject: [MINOR] Consistently use error in tcp_parse_tcp_req() X-Git-Tag: v1.5-dev8~190 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c54d8b63b291bfffd232214e65c6b05312c33ec;p=thirdparty%2Fhaproxy.git [MINOR] Consistently use error in tcp_parse_tcp_req() It seems to me that without this change tcp_parse_tcp_req() may leak memory. --- diff --git a/src/proto_tcp.c b/src/proto_tcp.c index cdaf150320..3b6d39d386 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -1213,7 +1213,7 @@ static int tcp_parse_tcp_req(char **args, int section_type, struct proxy *curpx, if (!(curpx->cap & PR_CAP_FE)) { snprintf(err, errlen, "%s %s is not allowed because %s %s is not a frontend", args[0], args[1], proxy_type_str(curpx), curpx->id); - return -1; + goto error; } if (tcp_parse_request_rule(args, arg, section_type, curpx, defpx, rule, err, errlen) < 0)