summaryrefslogtreecommitdiff
path: root/libmudflap
diff options
context:
space:
mode:
Diffstat (limited to 'libmudflap')
-rw-r--r--libmudflap/ChangeLog4
-rw-r--r--libmudflap/mf-hooks1.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog
index 8956c3c981a..a5f05f63da6 100644
--- a/libmudflap/ChangeLog
+++ b/libmudflap/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * mf-hooks1.c (free): Return on NULL before any logging.
+
2012-09-14 David Edelsohn <dje.gcc@gmail.com>
* configure: Regenerated.
diff --git a/libmudflap/mf-hooks1.c b/libmudflap/mf-hooks1.c
index 3dd332e12c6..7a273218d0f 100644
--- a/libmudflap/mf-hooks1.c
+++ b/libmudflap/mf-hooks1.c
@@ -238,11 +238,11 @@ WRAPPER(void, free, void *buf)
static int freeq_initialized = 0;
DECLARE(void, free, void *);
- BEGIN_PROTECT (free, buf);
-
if (UNLIKELY(buf == NULL))
return;
+ BEGIN_PROTECT (free, buf);
+
#if PIC
/* Check whether the given buffer might have come from a
__mf_0fn_malloc/calloc call that for whatever reason was not