[Mesa-dev] [PATCH 2/4] intel/decoder: Avoid freeing invalid pointer
Sagar Ghuge
sagar.ghuge at intel.com
Wed Sep 5 17:19:45 UTC 2018
Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
---
src/intel/common/gen_decoder.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c
index dbd060d53c..c44b8f060d 100644
--- a/src/intel/common/gen_decoder.c
+++ b/src/intel/common/gen_decoder.c
@@ -662,8 +662,6 @@ gen_spec_load_from_path(const struct gen_device_info *devinfo,
len = fread(buf, 1, XML_BUFFER_SIZE, input);
if (len == 0) {
fprintf(stderr, "fread: %m\n");
- free(ctx.spec);
- ctx.spec = NULL;
goto end;
}
if (XML_ParseBuffer(ctx.parser, len, len == 0) == 0) {
@@ -672,8 +670,6 @@ gen_spec_load_from_path(const struct gen_device_info *devinfo,
XML_GetCurrentLineNumber(ctx.parser),
XML_GetCurrentColumnNumber(ctx.parser),
XML_ErrorString(XML_GetErrorCode(ctx.parser)));
- free(ctx.spec);
- ctx.spec = NULL;
goto end;
}
} while (len > 0);
--
2.17.1
More information about the mesa-dev
mailing list