فهرست منبع

modules:carrierroute Better handling of fclose

Marius Zbihlei 15 سال پیش
والد
کامیت
b5ef768bca
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) {