From: Kaj-Michael Lang Date: Tue, 18 Mar 2008 18:58:15 +0000 (+0200) Subject: Make sure the statement is NULL if preparation fails. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5048118a8316831475b35c849fbb9b1b60905ff2;p=mapper Make sure the statement is NULL if preparation fails. --- diff --git a/src/db.h b/src/db.h index a6e3f2c..e512738 100644 --- a/src/db.h +++ b/src/db.h @@ -28,6 +28,7 @@ if (sqlite3_prepare_v2(db_, sql_, -1, &stmt_, NULL)!=SQLITE_OK) { \ g_printerr("Failed to prepare: [%s] Error: %s", \ sql_, sqlite3_errmsg(db_)); \ + stmt_=NULL; \ return FALSE; \ }