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 bd634ee..1af1eaa 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");
 }