diff options
author | 2013-09-21 17:29:17 +0000 | |
---|---|---|
committer | 2013-09-21 17:29:17 +0000 | |
commit | 97d5d4b962418e3e648246a809ce03d33b566903 (patch) | |
tree | 328321c85977b8756ec8d84f6d12e16569cb3fa4 /lib/libsqlite3/ext/misc/regexp.c | |
parent | regen (diff) | |
download | wireguard-openbsd-97d5d4b962418e3e648246a809ce03d33b566903.tar.xz wireguard-openbsd-97d5d4b962418e3e648246a809ce03d33b566903.zip |
Update sqlite to 3.8.0.2. A list of changes are available here:
http://sqlite.org/changes.html.
Tested in a bulk and ok landry@ ok espie@
Diffstat (limited to 'lib/libsqlite3/ext/misc/regexp.c')
-rw-r--r-- | lib/libsqlite3/ext/misc/regexp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libsqlite3/ext/misc/regexp.c b/lib/libsqlite3/ext/misc/regexp.c index 16fa7d0b968..7244d529981 100644 --- a/lib/libsqlite3/ext/misc/regexp.c +++ b/lib/libsqlite3/ext/misc/regexp.c @@ -713,6 +713,7 @@ static void re_sql_func( const char *zPattern; /* The regular expression */ const unsigned char *zStr;/* String being searched */ const char *zErr; /* Compile error message */ + int setAux = 0; /* True to invoke sqlite3_set_auxdata() */ pRe = sqlite3_get_auxdata(context, 0); if( pRe==0 ){ @@ -728,12 +729,15 @@ static void re_sql_func( sqlite3_result_error_nomem(context); return; } - sqlite3_set_auxdata(context, 0, pRe, (void(*)(void*))re_free); + setAux = 1; } zStr = (const unsigned char*)sqlite3_value_text(argv[1]); if( zStr!=0 ){ sqlite3_result_int(context, re_match(pRe, zStr, -1)); } + if( setAux ){ + sqlite3_set_auxdata(context, 0, pRe, (void(*)(void*))re_free); + } } /* |