2
0
Эх сурвалжийг харах

* Closed database connection after two error case. Thanks to Jan for
pointing out the bug.

Juha Heinanen 16 жил өмнө
parent
commit
f3e18e3885
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      modules/lcr/lcr_mod.c

+ 2 - 0
modules/lcr/lcr_mod.c

@@ -1052,6 +1052,7 @@ int reload_gws_and_lcrs(void)
     }
 
     if (lcr_dbf.use_table(dbh, &gw_table) < 0) {
+	lcr_dbf.close(dbh);
 	LM_ERR("error while trying to use gw table\n");
 	return -1;
     }
@@ -1273,6 +1274,7 @@ int reload_gws_and_lcrs(void)
     }
 
     if (lcr_dbf.use_table(dbh, &lcr_table) < 0) {
+	lcr_dbf.close(dbh);
 	LM_ERR("error while trying to use lcr table\n");
 	return -1;
     }