diff --git a/plugins/input/sqlite/sqlite_types.hpp b/plugins/input/sqlite/sqlite_types.hpp index 2e3f6be78..c2dc5238d 100644 --- a/plugins/input/sqlite/sqlite_types.hpp +++ b/plugins/input/sqlite/sqlite_types.hpp @@ -98,8 +98,9 @@ public: const char* column_text (int col, int& len) { + const char* text = (const char*) sqlite3_column_text (stmt_, col); len = sqlite3_column_bytes (stmt_, col); - return (const char*) sqlite3_column_text (stmt_, col); + return text; } const char* column_text (int col) @@ -109,8 +110,9 @@ public: const void* column_blob (int col, int& bytes) { + const char* blob = (const char*) sqlite3_column_blob (stmt_, col); bytes = sqlite3_column_bytes (stmt_, col); - return sqlite3_column_blob (stmt_, col); + return blob; } sqlite3_stmt* get_statement()