mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
broadcom/cle: do not leak spec
Fixes CID#1474553 "Resource leak (RESOURCE_LEAK)". Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9944>
This commit is contained in:
parent
b3799a3684
commit
4323279984
1 changed files with 3 additions and 0 deletions
|
|
@ -686,6 +686,7 @@ v3d_spec_load(const struct v3d_device_info *devinfo)
|
|||
|
||||
if (text_length == 0) {
|
||||
fprintf(stderr, "unable to find gen (%u) data\n", devinfo->ver);
|
||||
free(spec);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -695,6 +696,7 @@ v3d_spec_load(const struct v3d_device_info *devinfo)
|
|||
XML_SetUserData(ctx.parser, &ctx);
|
||||
if (ctx.parser == NULL) {
|
||||
fprintf(stderr, "failed to create parser\n");
|
||||
free(spec);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -720,6 +722,7 @@ v3d_spec_load(const struct v3d_device_info *devinfo)
|
|||
XML_ErrorString(XML_GetErrorCode(ctx.parser)));
|
||||
XML_ParserFree(ctx.parser);
|
||||
free(text_data);
|
||||
free(spec);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue