From: Victor Wagner Date: Wed, 27 Apr 2016 12:27:07 +0000 (+0300) Subject: Fix resource leak X-Git-Tag: REL_0_95~1^2~1 X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fcatdoc.git;a=commitdiff_plain;h=d9bb246b3ea1cf259a0000656ed881b2ff464faa;hp=26ea699acb7f01e0b3431fd6173feb1f09094d8e Fix resource leak --- diff --git a/src/substmap.c b/src/substmap.c index ac9b934..66346a8 100644 --- a/src/substmap.c +++ b/src/substmap.c @@ -51,7 +51,8 @@ SUBSTMAP read_substmap(char* filename) { } f=fopen(path,"rb"); if (!f) { - perror("catdoc"); + perror(path); + free(map); return NULL; } if (input_buffer)