]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5845: don't leak dbh in error conditions
authorMichael Jerris <mike@jerris.com>
Mon, 24 Mar 2014 20:09:21 +0000 (16:09 -0400)
committerMichael Jerris <mike@jerris.com>
Mon, 24 Mar 2014 20:10:12 +0000 (16:10 -0400)
src/mod/applications/mod_lcr/mod_lcr.c

index 65b4378f39ae88e8c5d397f1bbf8566a6c38a8c4..8ca25e69cd2c58b19ea5f06b63278f80befbf66d 100644 (file)
@@ -1171,7 +1171,7 @@ static switch_status_t lcr_load_config()
                                                if (db_check("ALTER TABLE carrier_gateway add codec varchar(255);") == SWITCH_TRUE) {
                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "adding codec field your lcr carrier_gateway database schema.\n");
                                                } else {
-                                                       return SWITCH_STATUS_FALSE;
+                                                       switch_goto_status(SWITCH_STATUS_FALSE, done);
                                                }
                                        }
 
@@ -1182,7 +1182,7 @@ static switch_status_t lcr_load_config()
                                                if (db_check("ALTER TABLE lcr add cid varchar(32);") == SWITCH_TRUE) {
                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "adding cid field to your lcr database schema.\n");
                                                } else {
-                                                       return SWITCH_STATUS_FALSE;
+                                                       switch_goto_status(SWITCH_STATUS_FALSE, done);
                                                }
                                        }
 
@@ -1190,7 +1190,7 @@ static switch_status_t lcr_load_config()
                                                if (db_check("ALTER TABLE lcr ADD lrn BOOLEAN NOT NULL DEFAULT false")) {
                                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "adding lrn field to your lcr database schema.\n");
                                                } else {
-                                                       return SWITCH_STATUS_FALSE;
+                                                       switch_goto_status(SWITCH_STATUS_FALSE, done);
                                                }
                                        }