Re: [libdbi-devel] Memory leak in dbi_result.c

2011-09-20 Thread Markus Hoenicka
Hi, I've fiddled a little with your testcase and the suggested fix. My results are as follows using the mysql driver (my loop ran only one tenth of the suggested cycles, so your values may be even higher): before fix: ==3410== LEAK SUMMARY: ==3410==definitely lost: 240,384 bytes in 10,00

Re: [libdbi-devel] Memory leak in dbi_result.c

2011-09-11 Thread Markus Hoenicka
Hi Tom, thank you for sharing the patch. The patched sources pass the tests without problems, but I'd like to set up your test case to make sure the patch indeed fixes a problem on my OS as well. I'll take care of this shortly. regards, Markus Quoting Tom Lane : > A loop such as the follo

[libdbi-devel] Memory leak in dbi_result.c

2011-09-06 Thread Tom Lane
A loop such as the following leaks memory in libdbi 0.8.3: for (n = 0; n < 10; n++) { res = dbi_conn_query(conn, "SELECT * FROM foo;"); if (!dbi_result_first_row(res)) { fprintf(stderr, "dbi_result_first_row() failed.\n"); exit(1);