diff --git a/qa/720.out b/qa/720.out index 030591c..6278e0e 100644 --- a/qa/720.out +++ b/qa/720.out @@ -10,9 +10,7 @@ pmUnparseHostAttrsSpec("pcps://nas1.servers.com:44321,4321@xxxxxxxxxxxxxxxxxxxx: === filtered valgrind report === Memcheck, a memory error detector Command: src/parsehostattrs pcps://nas1.servers.com:44321,4321@xxxxxxxxxxxxxxxxxxxx:44322?compress -LEAK SUMMARY: -definitely lost: 0 bytes in 0 blocks -indirectly lost: 0 bytes in 0 blocks +All heap blocks were freed -- no leaks are possible ERROR SUMMARY: 0 errors from 0 contexts ... === std out === pmParseHostAttrsSpec("pcp://localhost:23?compress", ...) @@ -24,9 +22,7 @@ pmUnparseHostAttrsSpec("pcp://localhost:23?compress") -> "pcp://localhost:23?com === filtered valgrind report === Memcheck, a memory error detector Command: src/parsehostattrs pcp://localhost:23?compress -LEAK SUMMARY: -definitely lost: 0 bytes in 0 blocks -indirectly lost: 0 bytes in 0 blocks +All heap blocks were freed -- no leaks are possible ERROR SUMMARY: 0 errors from 0 contexts ... === std out === pmParseHostAttrsSpec("pcp://some.host?user=pcpqa&compress&pass=blah", ...) @@ -40,9 +36,7 @@ pmUnparseHostAttrsSpec("pcp://some.host?user=pcpqa&compress&pass=blah") -> "pcp: === filtered valgrind report === Memcheck, a memory error detector Command: src/parsehostattrs pcp://some.host?user=pcpqa&compress&pass=blah -LEAK SUMMARY: -definitely lost: 0 bytes in 0 blocks -indirectly lost: 0 bytes in 0 blocks +All heap blocks were freed -- no leaks are possible ERROR SUMMARY: 0 errors from 0 contexts ... === std out === pmParseHostAttrsSpec("pcp://some.host?user=pcpqa", ...) @@ -54,9 +48,7 @@ pmUnparseHostAttrsSpec("pcp://some.host?user=pcpqa") -> "pcp://some.host?usernam === filtered valgrind report === Memcheck, a memory error detector Command: src/parsehostattrs pcp://some.host?user=pcpqa -LEAK SUMMARY: -definitely lost: 0 bytes in 0 blocks -indirectly lost: 0 bytes in 0 blocks +All heap blocks were freed -- no leaks are possible ERROR SUMMARY: 0 errors from 0 contexts ... === std out === pmParseHostAttrsSpec("some.host?user=pcpqa", ...) @@ -67,9 +59,7 @@ pmUnparseHostAttrsSpec("some.host?user=pcpqa") -> "some.host?username=pcpqa" === filtered valgrind report === Memcheck, a memory error detector Command: src/parsehostattrs some.host?user=pcpqa -LEAK SUMMARY: -definitely lost: 0 bytes in 0 blocks -indirectly lost: 0 bytes in 0 blocks +All heap blocks were freed -- no leaks are possible ERROR SUMMARY: 0 errors from 0 contexts ... === std out === pmParseHostAttrsSpec("some.host", ...) @@ -90,7 +80,5 @@ pmUnparseHostAttrsSpec("pcp://?compress") -> "pcp://?compress" === filtered valgrind report === Memcheck, a memory error detector Command: src/parsehostattrs pcp://?compress -LEAK SUMMARY: -definitely lost: 0 bytes in 0 blocks -indirectly lost: 0 bytes in 0 blocks +All heap blocks were freed -- no leaks are possible ERROR SUMMARY: 0 errors from 0 contexts ... diff --git a/qa/src/parsehostattrs.c b/qa/src/parsehostattrs.c index d35b4da..3d4480e 100644 --- a/qa/src/parsehostattrs.c +++ b/qa/src/parsehostattrs.c @@ -59,5 +59,7 @@ main(int argc, char **argv) printf("pmUnparseHostAttrsSpec(\"%s\") -> \"%s\"\n", argv[1], buffer); __pmFreeHostAttrsSpec(hosts, count, &attrs); + if (attrs.hash) + free(attrs.hash); exit(0); }