* mf-hooks1.c (free): Return on NULL before any logging.
authorAlexandre Oliva <aoliva@redhat.com>
Sat, 15 Dec 2012 10:24:50 +0000 (10:24 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Sat, 15 Dec 2012 10:24:50 +0000 (10:24 +0000)
From-SVN: r194518

libmudflap/ChangeLog
libmudflap/mf-hooks1.c

index 8956c3c981a934c39a728a10eff9915919a358b4..a5f05f63da6cb1821652f03447a5d1901d20fa92 100644 (file)
@@ -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.
index 3dd332e12c6b8ced877e7063eccb84f82e6b9699..7a273218d0f1fb1bf3ad3cddd5637f23c8131070 100644 (file)
@@ -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