xmlstarlet/xmlstarlet-xml_depyx.c.diff
Martin Pluskal 556c7c44cd Accepting request 393475 from home:pluskalm:branches:Publishing
- Update to 1.6.1:
  * handle unicode arguments under Windows
- Changes for 1.6.0:
  * get rid of "helpful" message about namespaces
  * update user guide
  * Enhancements:
    + add --stop option to val
    + add global option --no-doc-namespace
  * Build:
    + let the make install target succeed even if docs aren't 
      built.
- Cleanup spec file with spec-cleaner
- Cleanup dependencies
- Refresh xmlstarlet-xml_depyx.c.diff

OBS-URL: https://build.opensuse.org/request/show/393475
OBS-URL: https://build.opensuse.org/package/show/Publishing/xmlstarlet?expand=0&rev=31
2016-05-05 08:05:36 +00:00

33 lines
635 B
Diff

Index: src/xml_depyx.c
===================================================================
--- src/xml_depyx.c.orig
+++ src/xml_depyx.c
@@ -105,6 +105,7 @@ pyxDePyx(char *file)
{
static char line[INSZ];
FILE *in = stdin;
+ int opened_in = 0;
if (strcmp(file, "-"))
{
@@ -114,6 +115,7 @@ pyxDePyx(char *file)
fprintf(stderr, "error: could not open: %s\n", file);
exit(EXIT_BAD_FILE);
}
+ opened_in = 1;
}
while (!feof(in))
@@ -206,6 +208,11 @@ pyxDePyx(char *file)
}
}
+ if (opened_in)
+ {
+ fclose(in);
+ }
+
return EXIT_SUCCESS;
}