Skip to Content.
Sympa Menu

freetds - Re: [freetds] current_results...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] current_results...
  • Date: Thu, 2 Dec 2004 07:32:32 -0500

"ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com> wrote:
> "Assertion `result_found || tds->current_results == ((void *)0)' failed"
> means that current_results do not point to any known data. From gdb you
> can see that current_results point to a buffer however we can find this
> buffer in res_info, param_info, compute, cursors or dynamic... I always
> though that current_results should point to one of these members...
> valgrind prove that there is no memory leaks however I don't understand
> how this can happen....

Couldn't that be:

result_found || tds->current_results == NULL

just as well? That should be legal C everywhere.

You don't need a memory leak for this to happen. If you free the memory,
and don't set the pointer to NULL, the assertion will fail. Maybe if we
used TDS_ZERO_FREE more consistently, that wouldn't happen. (Not that I
do, but still.)

--jkl









Archive powered by MHonArc 2.6.24.

Top of Page