1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-24 09:53:10 +03:00

Fix two obscure memory leaks that can follow a malloc() failure in sqlite3_set_auxdata(). Ticket #2534. (CVS 4185)

FossilOrigin-Name: b88af1827bec3e8a32450dd0a073ffc3b12a5939
This commit is contained in:
danielk1977
2007-07-26 06:50:05 +00:00
parent a2d04e9a0f
commit e0fc52618c
6 changed files with 45 additions and 17 deletions

View File

@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.162 2007/07/23 19:12:42 drh Exp $
** $Id: func.c,v 1.163 2007/07/26 06:50:06 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1118,6 +1118,7 @@ static void test_auxdata(
if( zAux ){
zRet[i*2] = '1';
if( strcmp(zAux, z) ){
free_test_auxdata((void *)zRet);
sqlite3_result_error(pCtx, "Auxilary data corruption", -1);
return;
}