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 | |
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.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/opencl-lang.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b2c0f47..d8afa4b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Michael Snyder <msnyder@vmware.com> + + * opencl-lang.c (lval_func_free_closure): Fix use-after-free. + 2011-02-28 Tom Tromey <tromey@redhat.com> * psymtab.c (expand_partial_symbol_tables): Use 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. */ } } |