diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-06-10 16:21:59 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-06-10 16:21:59 -0700 |
commit | e6ff50b4634f2f2211997444a73d35277a0608d4 (patch) | |
tree | ed114d5f18eeb7c031445908a4261285bd2fd369 /src/Xdbe.c | |
parent | bba869e4ff5826d48ea409b4a8bf4ff7ad414453 (diff) | |
download | xorg-lib-libXext-e6ff50b4634f2f2211997444a73d35277a0608d4.tar.gz |
Use calloc instead of malloc if we may not initialize all the bytes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/Xdbe.c')
-rw-r--r-- | src/Xdbe.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -348,7 +348,7 @@ XdbeScreenVisualInfo *XdbeGetVisualInfo ( /* allocate list of visual information to be returned */ if ((*num_screens > 0) && (*num_screens < 65536)) - scrVisInfo = Xmalloc(*num_screens * sizeof(XdbeScreenVisualInfo)); + scrVisInfo = Xcalloc(*num_screens, sizeof(XdbeScreenVisualInfo)); else scrVisInfo = NULL; if (scrVisInfo == NULL) { |