printer BUGFIX close underlying file in case of freeing LY_OUT_FILEPATH output handler
diff --git a/src/printer.c b/src/printer.c
index 1fd8047..9685fc5 100644
--- a/src/printer.c
+++ b/src/printer.c
@@ -486,9 +486,7 @@
break;
case LY_OUT_FILEPATH:
free(out->method.fpath.filepath);
- if (destroy) {
- fclose(out->method.fpath.f);
- }
+ fclose(out->method.fpath.f);
break;
case LY_OUT_ERROR:
LOGINT(NULL);
@@ -574,7 +572,7 @@
}
}
-void
+API void
ly_print_flush(struct ly_out *out)
{
switch (out->type) {