|
Re: sqlite_free_table bug??: msg#00120db.sqlite.general
Sorry, I got it figured out. But I think its a good suggestion to add this in the code. When sqlite_free_table frees up the memory block, the pointer passed in is not set back to NULL. Thus on the second access of sqlite_free_table, it complains with Segmentation fault. Should really set the pointer back to NULL before exiting. Colin Colin Shum wrote: > > I am having problems with sqlite_free_table. I tried and cannot call it > twice in a row. Is that the same as cant be call with "NULL" pointer? > > using the same pointer as in example, something like this. > > > char **result; > char request_saved[300] = "select * from abc"; > int nrow = 0; > int ncolumn = 0; > int rc = 0; > > void FreeTable( void ) { > sqlite_free_table(result); > } > > int foo (void) { > FreeTable(result); > rc = sqlite_get_table(db, request_saved, &result, &nrow, &ncolumn, > &zErrMsg); > > return foo; > } > > Any ideas? > > To unsubscribe from this group, send an email to: > sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx > > > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/JjlUgA/vN2EAA/xGHJAA/EbFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | sqlite_free_table bug??: 00120, Colin Shum |
|---|---|
| Next by Date: | Re: sqlite_free_table bug??: 00120, ben . carlyle-LNVqYbe/PQpWk0Htik3J/w |
| Previous by Thread: | sqlite_free_table bug??i: 00120, Colin Shum |
| Next by Thread: | Re: sqlite_free_table bug??: 00120, ben . carlyle-LNVqYbe/PQpWk0Htik3J/w |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |