]> git.imager.perl.org - imager.git/commitdiff
remove a pointless NULL check from i_img_destroy()
authorTony Cook <tony@develop-help.com>
Sun, 3 Feb 2019 08:44:15 +0000 (19:44 +1100)
committerTony Cook <tony@develop-help.com>
Sun, 3 Feb 2019 08:44:15 +0000 (19:44 +1100)
i_img_destroy() access the pointer twice before the check.

image.c

diff --git a/image.c b/image.c
index bd634ee1480b43ff15664653043a052a456c9661..1af1eaa77cbf2059312dc09db7832027d047514e 100644 (file)
--- a/image.c
+++ b/image.c
@@ -289,7 +289,7 @@ i_img_destroy(i_img *im) {
   dIMCTXim(im);
   im_log((aIMCTX, 1,"i_img_destroy(im %p)\n",im));
   i_img_exorcise(im);
-  if (im) { myfree(im); }
+  myfree(im);
   im_context_refdec(aIMCTX, "img_destroy");
 }