wcdb icon indicating copy to clipboard operation
wcdb copied to clipboard

Potential memory leak -01.

Open rachyyyy opened this issue 3 years ago • 0 comments

The language of WCDB

Java

The platform of WCDB

Android

What's the issue?

Potential memory leak in com_tencent_wcdb_repair_DBDumpUtil.cpp line 308. Calling sqlite3_free() only when the zErr is corrupt will lead to a potential memory leak. Referenced from the doc, it says "To avoid memory leaks, the application should invoke sqlite3_free() on error message strings returned through the 5th parameter of sqlite3_exec() after the error message string is no longer needed."

image

rachyyyy avatar Sep 02 '22 08:09 rachyyyy