diff options
Diffstat (limited to 'render/picture.c')
-rw-r--r-- | render/picture.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/render/picture.c b/render/picture.c index 9def47b0f..fc2bf43d5 100644 --- a/render/picture.c +++ b/render/picture.c @@ -316,10 +316,9 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) } - pFormats = (PictFormatPtr) xalloc (nformats * sizeof (PictFormatRec)); + pFormats = xcalloc (nformats, sizeof (PictFormatRec)); if (!pFormats) return 0; - memset (pFormats, '\0', nformats * sizeof (PictFormatRec)); for (f = 0; f < nformats; f++) { pFormats[f].id = FakeClientID (0); |