Skip to content

Commit c703aa9

Browse files
committed
free memory on error.
1 parent 76c2d4a commit c703aa9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cdf.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "file.h"
3636

3737
#ifndef lint
38-
FILE_RCSID("@(#)$File: cdf.c,v 1.94 2017/03/27 21:34:32 christos Exp $")
38+
FILE_RCSID("@(#)$File: cdf.c,v 1.95 2017/03/28 15:13:07 christos Exp $")
3939
#endif
4040

4141
#include <assert.h>
@@ -1057,6 +1057,10 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
10571057
}
10581058
return 0;
10591059
out:
1060+
free(*info);
1061+
*info = NULL;
1062+
*count = 0;
1063+
*maxcount = 0;
10601064
errno = EFTYPE;
10611065
return -1;
10621066
}

0 commit comments

Comments
 (0)