[Mesa-dev] [PATCH] intel: aubinator: Fix resource leak in gen_spec_load_from_path

Mun Gwan-gyeong elongbug at gmail.com
Sun Nov 20 07:07:19 UTC 2016


This fixes resource leak in gen_spec_load_from_path XML_ParserCreate
failure path

CID 1373564

Signed-off-by: Mun Gwan-gyeong <elongbug at gmail.com>
---
 src/intel/tools/decoder.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/intel/tools/decoder.c b/src/intel/tools/decoder.c
index 6bd02bf..633251a 100644
--- a/src/intel/tools/decoder.c
+++ b/src/intel/tools/decoder.c
@@ -539,6 +539,7 @@ gen_spec_load_from_path(const struct gen_device_info *devinfo,
    XML_SetUserData(ctx.parser, &ctx);
    if (ctx.parser == NULL) {
       fprintf(stderr, "failed to create parser\n");
+      fclose(input);
       free(filename);
       return NULL;
    }
-- 
2.10.2



More information about the mesa-dev mailing list