aboutsummaryrefslogtreecommitdiff
path: root/gdb/opencl-lang.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-02-28 18:31:36 +0000
committerMichael Snyder <msnyder@vmware.com>2011-02-28 18:31:36 +0000
commitc05202a107c40a2e1efb1739b7dc2cfaf3b0ed9b (patch)
treef6f81fa45cbb733ea3fade8dbefb3176b9baa5d0 /gdb/opencl-lang.c
parent007d618909cb8e7f1c51f296a52f9729e85bf781 (diff)
downloadgdb-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.c2
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. */
}
}