summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/ext/misc/amatch.c
diff options
context:
space:
mode:
authorjturner <jturner@openbsd.org>2014-03-24 01:37:28 +0000
committerjturner <jturner@openbsd.org>2014-03-24 01:37:28 +0000
commit29ebcee2452a131560f5220abaf585648f84ce40 (patch)
tree844ef4fe135beff619b9e7b632f3b6722d6367e4 /lib/libsqlite3/ext/misc/amatch.c
parentannotate some packed structures with the alignment the hardware (diff)
downloadwireguard-openbsd-29ebcee2452a131560f5220abaf585648f84ce40.tar.xz
wireguard-openbsd-29ebcee2452a131560f5220abaf585648f84ce40.zip
Update sqlite to 3.8.4. A list of changes are available here:
http://sqlite.org/changes.html. Tested in a bulk and ok landry@
Diffstat (limited to 'lib/libsqlite3/ext/misc/amatch.c')
-rw-r--r--lib/libsqlite3/ext/misc/amatch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libsqlite3/ext/misc/amatch.c b/lib/libsqlite3/ext/misc/amatch.c
index b61308054ec..d869dbd8d13 100644
--- a/lib/libsqlite3/ext/misc/amatch.c
+++ b/lib/libsqlite3/ext/misc/amatch.c
@@ -786,6 +786,7 @@ static void amatchFree(amatch_vtab *p){
sqlite3_free(p->zVocabTab);
sqlite3_free(p->zVocabWord);
sqlite3_free(p->zVocabLang);
+ sqlite3_free(p->zSelf);
memset(p, 0, sizeof(*p));
sqlite3_free(p);
}
@@ -948,6 +949,9 @@ static void amatchClearCursor(amatch_cursor *pCur){
pCur->pAllWords = 0;
sqlite3_free(pCur->zInput);
pCur->zInput = 0;
+ sqlite3_free(pCur->zBuf);
+ pCur->zBuf = 0;
+ pCur->nBuf = 0;
pCur->pCost = 0;
pCur->pWord = 0;
pCur->pCurrent = 0;
@@ -1103,7 +1107,7 @@ static int amatchNext(sqlite3_vtab_cursor *cur){
char *zSql;
if( p->zVocabLang && p->zVocabLang[0] ){
zSql = sqlite3_mprintf(
- "SELECT \"%s\" FROM \"%s\"",
+ "SELECT \"%w\" FROM \"%w\"",
" WHERE \"%w\">=?1 AND \"%w\"=?2"
" ORDER BY 1",
p->zVocabWord, p->zVocabTab,
@@ -1111,7 +1115,7 @@ static int amatchNext(sqlite3_vtab_cursor *cur){
);
}else{
zSql = sqlite3_mprintf(
- "SELECT \"%s\" FROM \"%s\""
+ "SELECT \"%w\" FROM \"%w\""
" WHERE \"%w\">=?1"
" ORDER BY 1",
p->zVocabWord, p->zVocabTab,