commit | 15d12040ff48c5190addd315092c9262fbe54e91 | [log] [tgz] |
---|---|---|
author | Daniel Veillard <veillard@redhat.com> | Thu Feb 06 10:38:00 2014 +0100 |
committer | Daniel Veillard <veillard@redhat.com> | Thu Feb 06 10:38:00 2014 +0100 |
tree | b21e628d9c577794fa49c04430d0d2e9607a3e02 | |
parent | 054c716ea1bf001544127a4ab4f4346d1b9947e7 [diff] [blame] |
Fix an fd leak in an error case
diff --git a/catalog.c b/catalog.c index 549e592..5773db3 100644 --- a/catalog.c +++ b/catalog.c
@@ -994,6 +994,11 @@ content = (xmlChar*)xmlMallocAtomic(size + 10); if (content == NULL) { xmlCatalogErrMemory("allocating catalog data"); +#ifdef HAVE_STAT + close(fd); +#else + fclose(fd); +#endif return (NULL); } #ifdef HAVE_STAT