blob: cf8c01c731ef2cdba5b3edfe203b53b2b61f0a58 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
diff --git a/libopendmarc/opendmarc_tld.c b/libopendmarc/opendmarc_tld.c
index 8ac45e8..0c04370 100644
--- a/libopendmarc/opendmarc_tld.c
+++ b/libopendmarc/opendmarc_tld.c
@@ -134,8 +134,11 @@
return (errno == 0) ? ENOMEM : errno;
fp = fopen(path_fname, "r");
- if (fp == NULL)
- return errno;
+ if (fp == NULL) {
+ ret = errno;
+ opendmarc_hash_shutdown(hashp);
+ return ret;
+ }
errno = 0;
while (fgets((char *)buf, sizeof buf, fp) != NULL)
|