construct_error(): strdup the supplied s (string) param which gives
extra info about some kinds of errors.  It was being allocated on the
stack by complain2/3 in mac_malloc_wrappers.c.

If the constructed error is found to be a duplicate, free the strdup'd
space.  That limits the worst-case space leak to one strdup'd string
for each different error we keep track of, and the latter by default
is limited to 300.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1785 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 file changed