diff options
Diffstat (limited to 'catalog.c')
-rw-r--r-- | catalog.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -997,18 +997,15 @@ xmlLoadFileContent(const char *filename) } #ifdef HAVE_STAT len = read(fd, content, size); + close(fd); #else len = fread(content, 1, size, fd); + fclose(fd); #endif if (len < 0) { xmlFree(content); return (NULL); } -#ifdef HAVE_STAT - close(fd); -#else - fclose(fd); -#endif content[len] = 0; return(content); |