\r
void linphone_core_message_storage_init(LinphoneCore *lc){\r
int ret;\r
- char *errmsg=NULL;\r
+ const char *errmsg;\r
sqlite3 *db;\r
ret=sqlite3_open(lc->chat_db_file,&db);\r
if(ret != SQLITE_OK) {\r
+ errmsg=sqlite3_errmsg(db);\r
printf("Error in the opening: %s.\n", errmsg);\r
sqlite3_close(db);\r
- sqlite3_free(errmsg);\r
}\r
linphone_create_table(db);\r
lc->db=db;\r