summaryrefslogtreecommitdiff
path: root/readline/xmalloc.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-06-29 20:51:10 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-06-29 20:51:10 +0000
commit685e9fd1355b9b7c125056f6e1a8b001a14801d2 (patch)
tree098a6f4abd71171a42b6408eb357573c559ac4e6 /readline/xmalloc.h
parentf7956ea4e1b85fbdb003cd7746a5a7794675eeec (diff)
downloadgdb-685e9fd1355b9b7c125056f6e1a8b001a14801d2.tar.gz
readline/
Avoid free from a signal handler. * Makefile.in (xfree.o): Add readline.h. * xfree.c: Include stdio.h and readline.h. (xfree): Return on RL_STATE_SIGHANDLER. * xmalloc.h (xfree): New definition.
Diffstat (limited to 'readline/xmalloc.h')
-rw-r--r--readline/xmalloc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/readline/xmalloc.h b/readline/xmalloc.h
index f40d7a596a2..0fb6a1960e1 100644
--- a/readline/xmalloc.h
+++ b/readline/xmalloc.h
@@ -38,6 +38,9 @@
#endif /* !PTR_T */
+/* xmalloc and xrealloc should be also protected from RL_STATE_SIGHANDLER. */
+#define xfree xfree_readline
+
extern PTR_T xmalloc PARAMS((size_t));
extern PTR_T xrealloc PARAMS((void *, size_t));
extern void xfree PARAMS((void *));