From c703aa9fcc049b649370ca720f731a67c1adcf0b Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Tue, 28 Mar 2017 15:13:07 +0000 Subject: [PATCH] free memory on error. --- src/cdf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cdf.c b/src/cdf.c index d0d50336..22a96eda 100644 --- a/src/cdf.c +++ b/src/cdf.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.94 2017/03/27 21:34:32 christos Exp $") +FILE_RCSID("@(#)$File: cdf.c,v 1.95 2017/03/28 15:13:07 christos Exp $") #endif #include @@ -1057,6 +1057,10 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, } return 0; out: + free(*info); + *info = NULL; + *count = 0; + *maxcount = 0; errno = EFTYPE; return -1; } -- 2.49.0