From 2b58d0939a69405b9cdb975416503b9cc6aa8c1a Mon Sep 17 00:00:00 2001 From: jkahrs Date: Sun, 12 Aug 2007 15:02:12 +0000 Subject: [PATCH] Sync with savannah gawk cvsps 133. In builtin.c (format_tree): Free obuf before call to fatal to keep valgrind happy. --- ChangeLog | 5 +++++ XMLChangeLog | 7 +++++++ builtin.c | 4 +++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 39a68a1..7c67269 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 3 15:01:38 2007 Andrew J. Schorr + + * builtin.c (format_tree): Free `obuf' before call to `fatal' + to keep valgrind happy. + Mon Jun 4 01:12:21 2007 Arnold D. Robbins * All relevant files: Updated copyright year to 2007. diff --git a/XMLChangeLog b/XMLChangeLog index b516f1a..49f7a05 100644 --- a/XMLChangeLog +++ b/XMLChangeLog @@ -1,3 +1,10 @@ +Sun Aug 12 14:59:01 UTC 2007 Juergen Kahrs + + Sync with savannah gawk cvsps 133. + + * ChangeLog, builtin.c (format_tree): Free `obuf' before call to `fatal' + to keep valgrind happy. + Sun Jul 1 19:28:54 UTC 2007 Andrew J. Schorr * bisonfix.sed: Remove from CVS (no longer used). diff --git a/builtin.c b/builtin.c index 80d38b8..f3ef1f0 100644 --- a/builtin.c +++ b/builtin.c @@ -1245,11 +1245,13 @@ format_tree( default: break; } - if (toofew) + if (toofew) { + free(obuf); /* silence valgrind */ fatal("%s\n\t`%s'\n\t%*s%s", _("not enough arguments to satisfy format string"), fmt_string, (int) (s1 - fmt_string - 1), "", _("^ ran out for this one")); + } } if (do_lint) { if (need_format)