SQLite User Forum

The sqlite3_deserialize comment and behavior do not coincide
Login

The sqlite3_deserialize comment and behavior do not coincide

(1) By holybrake on 2020-10-17 20:36:04 [source]

Hello!

There is the following comment in sqlite3.h: ** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the ** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then ** [sqlite3_free()] is invoked on argument P prior to returning. But this is not true - the only usage of pData is on the line: p->aData = pData; Just before the successful exit, so the memory block is never freed on the function fail

(2) By Richard Hipp (drh) on 2020-10-17 22:50:10 in reply to 1 [link] [source]

Thanks for the report. Should be fixed by check-in d6fac8a1d3efeb2c.