mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-06 11:28:00 +00:00
[MINOR] Consistently free expr on error in cfg_parse_listen()
It seems to me that without this change cfg_parse_listen() may leak memory.
This commit is contained in:
parent
6c54d8b63b
commit
5e55f5dadc
@ -2918,6 +2918,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
Alert("parsing [%s:%d] : '%s': fetch method '%s' can not be used on response.\n",
|
||||
file, linenum, args[0], expr->fetch->kw);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
free(expr);
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
@ -2925,6 +2926,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
Alert("parsing [%s:%d] : '%s': fetch method '%s' can not be used on request.\n",
|
||||
file, linenum, args[0], expr->fetch->kw);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
free(expr);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
@ -2939,6 +2941,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
Alert("parsing [%s:%d] : '%s': error detected while parsing sticking condition.\n",
|
||||
file, linenum, args[0]);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
free(expr);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
@ -2946,6 +2949,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
Alert("parsing [%s:%d] : '%s': unknown keyword '%s'.\n",
|
||||
file, linenum, args[0], args[myidx]);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
free(expr);
|
||||
goto out;
|
||||
}
|
||||
if (flags & STK_ON_RSP)
|
||||
|
Loading…
Reference in New Issue
Block a user