diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-02-28 18:31:36 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-02-28 18:31:36 +0000 |
commit | c05202a107c40a2e1efb1739b7dc2cfaf3b0ed9b (patch) | |
tree | f6f81fa45cbb733ea3fade8dbefb3176b9baa5d0 /gdb/opencl-lang.c | |
parent | 007d618909cb8e7f1c51f296a52f9729e85bf781 (diff) | |
download | gdb-c05202a107c40a2e1efb1739b7dc2cfaf3b0ed9b.zip gdb-c05202a107c40a2e1efb1739b7dc2cfaf3b0ed9b.tar.gz gdb-c05202a107c40a2e1efb1739b7dc2cfaf3b0ed9b.tar.bz2 |
2011-02-28 Michael Snyder <msnyder@vmware.com>
* opencl-lang.c (lval_func_free_closure): Fix use-after-free.
Diffstat (limited to 'gdb/opencl-lang.c')
-rw-r--r-- | gdb/opencl-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index e13bac3..1004f08 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -348,9 +348,9 @@ lval_func_free_closure (struct value *v) if (c->refc == 0) { + value_free (c->val); /* Decrement the reference counter of the value. */ xfree (c->indices); xfree (c); - value_free (c->val); /* Decrement the reference counter of the value. */ } } |