Browse Source

modules:carrierroute Better handling of fclose

Marius Zbihlei 15 years ago
parent
commit
b5ef768bca
1 changed files with 2 additions and 1 deletions
  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) {