aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-05-15 06:15:27 +0000
committerAndrew Cagney <cagney@redhat.com>2000-05-15 06:15:27 +0000
commitf23d52e0a54905bc88c1a5ea25168227356d6f37 (patch)
tree9b55315786830882293a4225641d0bbd44fecefc /gdb/ax-general.c
parentCleanup delete_breakpoint cleanups. (diff)
downloadbinutils-gdb-f23d52e0a54905bc88c1a5ea25168227356d6f37.tar.gz
binutils-gdb-f23d52e0a54905bc88c1a5ea25168227356d6f37.tar.bz2
binutils-gdb-f23d52e0a54905bc88c1a5ea25168227356d6f37.zip
Cleanup free_agent_expr cleanups.
Diffstat (limited to 'gdb/ax-general.c')
-rw-r--r--gdb/ax-general.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ax-general.c b/gdb/ax-general.c
index 34ec3b3071e..4612e8ea42f 100644
--- a/gdb/ax-general.c
+++ b/gdb/ax-general.c
@@ -62,6 +62,18 @@ free_agent_expr (x)
free (x);
}
+static void
+do_free_agent_expr_cleanup (void *x)
+{
+ free_agent_expr (x);
+}
+
+struct cleanup *
+make_cleanup_free_agent_expr (struct agent_expr *x)
+{
+ return make_cleanup (do_free_agent_expr_cleanup, x);
+}
+
/* Make sure that X has room for at least N more bytes. This doesn't
affect the length, just the allocated size. */