[poppler] goo/gmem.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 17 09:33:51 UTC 2019


 goo/gmem.h |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 95f5088f2fef4f0a7440c30df648d44a3b247a40
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Jul 17 00:53:17 2019 +0200

    gfree: No need to check for p != nullptr, std::free already does that

diff --git a/goo/gmem.h b/goo/gmem.h
index 2eb88be7..7fa56446 100644
--- a/goo/gmem.h
+++ b/goo/gmem.h
@@ -55,11 +55,9 @@ inline void *gmalloc_checkoverflow(size_t size) {
   return gmalloc(size, true);
 }
 
-/// Same as free, but checks for and ignores NULL pointers.
+/// Same as free
 inline void gfree(void *p) {
-  if (p) {
-    std::free(p);
-  }
+  std::free(p);
 }
 
 /// Same as realloc, but prints error message and exits if realloc() returns NULL.


More information about the poppler mailing list