瀏覽代碼

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

Daniel-Constantin Mierla 8 年之前
父節點
當前提交
cdf2976b85
共有 1 個文件被更改,包括 2 次插入0 次删除
  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;