progs/util: Fix memory leak if malloc fails in tkRGBImageLoad.
(cherry picked from commit 786d539511eb3c5a4101b11b7f8e90d60123ac46)
diff --git a/progs/util/readtex.c b/progs/util/readtex.c
index ec27e20..c57b66b 100644
--- a/progs/util/readtex.c
+++ b/progs/util/readtex.c
@@ -250,6 +250,7 @@
    final = (TK_RGBImageRec *)malloc(sizeof(TK_RGBImageRec));
    if (final == NULL) {
       fprintf(stderr, "Out of memory!\n");
+      RawImageClose(raw);
       return NULL;
    }
    final->sizeX = raw->sizeX;