From 8b1463121ee4758f36e3fb78e3afb764ef6fea0e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 22 Dec 2008 09:48:21 +0000 Subject: [PATCH] * buffer.c (init_buffer): Use realloc instead of xrealloc. * gtkutil.c (free_widget_value): Use xfree instead of free. --- src/ChangeLog | 5 +++++ src/buffer.c | 4 +++- src/gtkutil.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 844b641d696..7c7b327f274 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-12-22 Andreas Schwab + + * buffer.c (init_buffer): Use realloc instead of xrealloc. + * gtkutil.c (free_widget_value): Use xfree instead of free. + 2008-12-22 Martin Rudalics * frame.c (delete_frame): New function derived from diff --git a/src/buffer.c b/src/buffer.c index 50db471ae12..110cb4f7faf 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5343,7 +5343,9 @@ init_buffer () if (!(IS_DIRECTORY_SEP (pwd[len - 1]))) { /* Grow buffer to add directory separator and '\0'. */ - pwd = (char *) xrealloc (pwd, len + 2); + pwd = (char *) realloc (pwd, len + 2); + if (!pwd) + fatal ("`get_current_dir_name' failed: %s\n", strerror (errno)); pwd[len] = DIRECTORY_SEP; pwd[len + 1] = '\0'; } diff --git a/src/gtkutil.c b/src/gtkutil.c index 5f55e6daef6..506c3501662 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -224,7 +224,7 @@ free_widget_value (wv) { /* When the number of already allocated cells is too big, We free it. */ - free (wv); + xfree (wv); malloc_cpt--; } else -- 2.39.2