summaryrefslogtreecommitdiff
path: root/libopie2
Unidiff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/osqlitedriver.cpp9
-rw-r--r--libopie2/opiedb/osqlitedriver.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp
index f07d520..3ba161e 100644
--- a/libopie2/opiedb/osqlitedriver.cpp
+++ b/libopie2/opiedb/osqlitedriver.cpp
@@ -136,7 +136,6 @@ bool OSQLiteDriver::open() {
136 free( error ); 136 free( error );
137 return false; 137 return false;
138 } 138 }
139 sqreg = (sqregex *)malloc(sizeof(sqreg));
140 sqlite_create_function(m_sqlite,"rlike",3,rlikeFunc,&sqreg); 139 sqlite_create_function(m_sqlite,"rlike",3,rlikeFunc,&sqreg);
141 return true; 140 return true;
142} 141}
@@ -149,10 +148,10 @@ bool OSQLiteDriver::open() {
149bool OSQLiteDriver::close() { 148bool OSQLiteDriver::close() {
150 if (m_sqlite ) 149 if (m_sqlite )
151 sqlite_close( m_sqlite ), m_sqlite=0l; 150 sqlite_close( m_sqlite ), m_sqlite=0l;
152 if (sqreg->regex_raw != NULL){ 151 if (sqreg.regex_raw != NULL){
153 free(sqreg->regex_raw); 152 free(sqreg.regex_raw);
154 sqreg->regex_raw=NULL; 153 sqreg.regex_raw=NULL;
155 regfree(&sqreg->regex_c); 154 regfree(&sqreg.regex_c);
156 } 155 }
157 return true; 156 return true;
158} 157}
diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h
index 95c9e2f..adec331 100644
--- a/libopie2/opiedb/osqlitedriver.h
+++ b/libopie2/opiedb/osqlitedriver.h
@@ -41,7 +41,7 @@ private:
41 static int call_back( void*, int, char**, char** ); 41 static int call_back( void*, int, char**, char** );
42 QString m_url; 42 QString m_url;
43 sqlite *m_sqlite; 43 sqlite *m_sqlite;
44 sqregex *sqreg; 44 sqregex sqreg;
45}; 45};
46} 46}
47} 47}