Fix resource leak
authorVictor Wagner <vitus@wagner.pp.ru>
Wed, 27 Apr 2016 12:27:07 +0000 (15:27 +0300)
committerVictor Wagner <vitus@wagner.pp.ru>
Wed, 27 Apr 2016 12:27:07 +0000 (15:27 +0300)
src/substmap.c

index ac9b9341f50a0ee1d934bdd2f00ddd1837ab9ae8..66346a8b99369f1d77a643e80e5485b414ab918b 100644 (file)
@@ -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)