Dennis Cote uttered:


Your call to sqlite3_free_table is correct.

You free the error message by calling sqlite3_free(tresult.err_msg).

If either pointer returned by sqlite3_get_table() is NULL, then no memory was allocated, so there is no need to free it, however I believe it should be safe to call the free routines with a NULL pointer.


From the discussion the other day, I looked at the implementation of
sqlite3_free, and the sqlite3GenericFree that implements it asserts that the pointer passed in is not NULL. So it is not safe to pass in a NULL pointer.

It should be safe, if sqlite3_free and co are mimicking the behaviour of the libc free. The current CVS implementation should therefore check for NULL and do nothing in this case.



HTH
Dennis Cote



Christian

--
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \

Reply via email to