> I read that. Just wanted to see if I was interpreting it correctly. There
> appears to be some ambivalence in the _prepare method.
> 
> Specifically, I'm concluding the "if it's not nil, free it" is OK.

Never free a pointer returned from sqlite3_errmsg() or sqlite3_errmsg16().

If you call sqlite3_exec as follows:

char *zErrMsg = 0;
sqlite3_exec(..., &zErrMsg);

Then free zErrMsg using sqlite3_free(). If no error message was written,
then aErrMsg is still NULL and sqlite3_free() is a harmless no-op.

Dan.



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

Reply via email to