1
0
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:
danielk1977
2008-01-05 18:44:29 +00:00
parent a9d1ccb9b0
commit dba0137e1e
4 changed files with 21 additions and 14 deletions

View File

@@ -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