Skip to content

Commit

Permalink
Avoid double delete in read_only check
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Nov 13, 2016
1 parent bc193e8 commit 1e4ec8d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/MySQL_HostGroups_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,7 @@ void MySQL_HostGroups_Manager::read_only_action(char *hostname, int port, int re
// }

delete resultset;
resultset=NULL;
if (admindb==NULL) { // we initialize admindb only if needed
admindb=new SQLite3DB();
admindb->open((char *)"file:mem_admindb?mode=memory&cache=shared", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX);
Expand Down

0 comments on commit 1e4ec8d

Please sign in to comment.