summaryrefslogtreecommitdiff
path: root/gdb/ax-general.c
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
commit34f635b0c7ff5ebb93b4ccafa2753e577d34ec6f (patch)
treeaefca76da0a080ba0d6fd2e64db7e4f862affb3c /gdb/ax-general.c
parent9bbbb8a7e30147a00f868577426ca9f2bf4295fb (diff)
downloadgdb-34f635b0c7ff5ebb93b4ccafa2753e577d34ec6f.tar.gz
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. */