Skip to content

Commit dfe2fcb

Browse files
committed
lib/portableproplib: fix memory leak in *_internalize_from_zfile error path
1 parent ddef27b commit dfe2fcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/portableproplib/prop_zlib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ prop ## type ## _internalize_from_zfile(const char *fname) \
8787
\
8888
/* 15+16 to use gzip method */ \
8989
if (inflateInit2(&strm, 15+16) != Z_OK) \
90-
goto out2; \
90+
goto out1; \
9191
\
9292
strm.avail_in = mf->poimf_mapsize; \
9393
strm.next_in = (unsigned char *)mf->poimf_xml; \
@@ -103,7 +103,7 @@ prop ## type ## _internalize_from_zfile(const char *fname) \
103103
case Z_NEED_DICT: \
104104
case Z_MEM_ERROR: \
105105
errno = EINVAL; \
106-
goto out1; \
106+
goto out2; \
107107
} \
108108
have = _READ_CHUNK - strm.avail_out; \
109109
totalsize += have; \

0 commit comments

Comments
 (0)