mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Fix a memory leak introduced with #4687. (CVS 4688)
FossilOrigin-Name: 2b98b0fca82e285ae6b38384587aafa27985fa34
This commit is contained in:
@@ -575,9 +575,11 @@ void sqlite3VdbeComment(Vdbe *p, const char *zFormat, ...){
|
||||
va_list ap;
|
||||
assert( p->nOp>0 || p->aOp==0 );
|
||||
assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed );
|
||||
va_start(ap, zFormat);
|
||||
p->aOp[p->nOp-1].zComment = sqlite3VMPrintf(p->db, zFormat, ap);
|
||||
va_end(ap);
|
||||
if( p->nOp ){
|
||||
va_start(ap, zFormat);
|
||||
p->aOp[p->nOp-1].zComment = sqlite3VMPrintf(p->db, zFormat, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user