aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/ead
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/services/ead')
-rw-r--r--package/network/services/ead/src/tinysrp/t_pw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/network/services/ead/src/tinysrp/t_pw.c b/package/network/services/ead/src/tinysrp/t_pw.c
index 18e929bb79..5da5e26b78 100644
--- a/package/network/services/ead/src/tinysrp/t_pw.c
+++ b/package/network/services/ead/src/tinysrp/t_pw.c
@@ -94,8 +94,10 @@ t_openpw(fp)
else
close_flag = 0;
- if((tpw = malloc(sizeof(struct t_pw))) == NULL)
+ if((tpw = malloc(sizeof(struct t_pw))) == NULL) {
+ fclose(fp);
return NULL;
+ }
tpw->instream = fp;
tpw->close_on_exit = close_flag;
tpw->state = FILE_ONLY;