BUG/MINOR: haproxy: Add missing free of server->(hostname|resolvers_id)

Given the following example configuration:

    resolvers test
    	nameserver test 127.0.0.1:53
    listen foo
    	bind *:8080
    	server foo example.com resolvers test

Running a configuration check within valgrind reports:

    ==21995== 5 bytes in 1 blocks are definitely lost in loss record 1 of 30
    ==21995==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==21995==    by 0x5726489: strdup (strdup.c:42)
    ==21995==    by 0x4B2CFB: parse_server (server.c:2163)
    ==21995==    by 0x4680C1: cfg_parse_listen (cfgparse-listen.c:534)
    ==21995==    by 0x459E33: readcfgfile (cfgparse.c:2167)
    ==21995==    by 0x50778D: init (haproxy.c:2021)
    ==21995==    by 0x418262: main (haproxy.c:3133)
    ==21995==
    ==21995== 12 bytes in 1 blocks are definitely lost in loss record 3 of 30
    ==21995==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==21995==    by 0x5726489: strdup (strdup.c:42)
    ==21995==    by 0x4AC666: srv_prepare_for_resolution (server.c:1606)
    ==21995==    by 0x4B2EBD: parse_server (server.c:2081)
    ==21995==    by 0x4680C1: cfg_parse_listen (cfgparse-listen.c:534)
    ==21995==    by 0x459E33: readcfgfile (cfgparse.c:2167)
    ==21995==    by 0x50778D: init (haproxy.c:2021)
    ==21995==    by 0x418262: main (haproxy.c:3133)

with one more leak unrelated to `struct server`. After applying this
patch the leak is gone as expected.

This is a very minor leak that can only be observed if deinit() is called,
shortly before the OS will free all memory of the process anyway. No
backport needed.
1 file changed