Use malloc to obtain space for sqlite3_aggregate_context(). Ticket #2751. (CVS 4524)

FossilOrigin-Name: bf75058f5777ce4b03f2287406805236470f70d0
This commit is contained in:
danielk1977
2007-11-05 12:46:04 +00:00
parent 6d64307b03
commit d949fd3b34
3 changed files with 8 additions and 13 deletions
+1 -6
View File
@@ -446,12 +446,7 @@ void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
pMem->flags = MEM_Agg;
pMem->xDel = sqlite3_free;
pMem->u.pDef = p->pFunc;
if( nByte<=NBFS ){
pMem->z = pMem->zShort;
memset(pMem->z, 0, nByte);
}else{
pMem->z = sqlite3DbMallocZero(p->s.db, nByte);
}
pMem->z = sqlite3DbMallocZero(p->s.db, nByte);
}
}
return (void*)pMem->z;