Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4e8ec8a6
Commit
4e8ec8a6
authored
Feb 14, 2020
by
Matteo Bruni
Committed by
Alexandre Julliard
Feb 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Free variable definitions data on allocation errors.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18545725
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
hlsl.y
dlls/d3dcompiler_43/hlsl.y
+11
-2
No files found.
dlls/d3dcompiler_43/hlsl.y
View file @
4e8ec8a6
...
...
@@ -530,6 +530,15 @@ static void struct_var_initializer(struct list *list, struct hlsl_ir_var *var,
d3dcompiler_free(initializer->args);
}
static void free_parse_variable_def(struct parse_variable_def *v)
{
free_parse_initializer(&v->initializer);
d3dcompiler_free(v->name);
d3dcompiler_free((void *)v->semantic);
d3dcompiler_free(v->reg_reservation);
d3dcompiler_free(v);
}
static struct list *declare_vars(struct hlsl_type *basic_type, DWORD modifiers, struct list *var_list)
{
struct hlsl_type *type;
...
...
@@ -543,7 +552,7 @@ static struct list *declare_vars(struct hlsl_type *basic_type, DWORD modifiers,
{
ERR("Out of memory.\n");
LIST_FOR_EACH_ENTRY_SAFE(v, v_next, var_list, struct parse_variable_def, entry)
d3dcompiler_free
(v);
free_parse_variable_def
(v);
d3dcompiler_free(var_list);
return NULL;
}
...
...
@@ -558,7 +567,7 @@ static struct list *declare_vars(struct hlsl_type *basic_type, DWORD modifiers,
if (!var)
{
ERR("Out of memory.\n");
d3dcompiler_free
(v);
free_parse_variable_def
(v);
continue;
}
if (v->array_size)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment