Browse Source

modules:carrierroute Better handling of fclose

Marius Zbihlei 15 năm trước cách đây
mục cha
commit
b5ef768bca
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      modules/carrierroute/cr_config.c

+ 2 - 1
modules/carrierroute/cr_config.c

@@ -168,7 +168,8 @@ static int backup_config(void) {
 
 	if (fclose(from)==EOF) {
 		LM_ERR("Error closing source file.\n");
-		goto errclose;
+		fclose(to);
+		goto errout;
 	}
 
 	if (fclose(to)==EOF) {