aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/RdBitF.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/RdBitF.c')
-rw-r--r--libX11/src/RdBitF.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libX11/src/RdBitF.c b/libX11/src/RdBitF.c
index 07967aebe..ab7d800d3 100644
--- a/libX11/src/RdBitF.c
+++ b/libX11/src/RdBitF.c
@@ -216,6 +216,11 @@ XReadBitmapFileData (
*ptr=value;
}
}
+
+ /* If we got to this point, we read a full bitmap file. Break so we don't
+ * start reading another one from the same file and leak the memory
+ * allocated for the previous one. */
+ break;
} /* end while */
fclose(fstream);