Ver Fonte

db_text: close file stream in case of error reading table file

Daniel-Constantin Mierla há 8 anos atrás
pai
commit
cdf2976b85
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      src/modules/db_text/dbt_file.c

+ 2 - 0
src/modules/db_text/dbt_file.c

@@ -489,6 +489,8 @@ clean:
 	LM_DBG("error at row=%d col=%d c=%c\n", crow+1, ccol+1, c);
 	if(dtp)
 		dbt_table_free(dtp);
+	if(fin)
+		fclose(fin);
 	if(buf)
 		pkg_free(buf);
 	return NULL;