[BUG] str2sun could leak a small buffer in case of error during parsing
authorWilly Tarreau <w@1wt.eu>
Fri, 7 Mar 2008 09:07:04 +0000 (10:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Mar 2008 09:07:04 +0000 (10:07 +0100)
commitcaf720d3ff7758273278aecab26bb7624ec2f555
tree7f44edfc629edadf5b0d30074e5aa22b94cc4364
parentf32d19a3957be4f3b275a72105fb53b39219999e
[BUG] str2sun could leak a small buffer in case of error during parsing

Matt Farnsworth reported a memory leak in str2sun() in case a too large
socket path is passed. The bug is very minor because it only happens
once during config parsing, but has to be fixed nevertheless. The patch
Matt provided could even be improved by completely removing the useless
strdup() in this function.
include/common/standard.h
src/standard.c