ソースを参照

modules:carrierroute Better handling of fclose
(cherry picked from commit b5ef768bcabf905d455ca26225c55f858cbe4c48)

Marius Zbihlei 15 年 前
コミット
54ae4e8edb
1 ファイル変更2 行追加1 行削除
  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) {