[X2Go-Commits] [nx-libs] 22/54: xfixes: use calloc for some structs

git-admin at x2go.org git-admin at x2go.org
Sun Mar 24 10:05:02 CET 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository nx-libs.

commit e7a50079ed90bd9f9f292d3f40ed3905c034a4cc
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Thu Feb 28 23:15:22 2019 +0100

    xfixes: use calloc for some structs
    
    Attributes ArcticaProject/nx-libs#382
---
 nx-X11/programs/Xserver/xfixes/cursor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nx-X11/programs/Xserver/xfixes/cursor.c b/nx-X11/programs/Xserver/xfixes/cursor.c
index 8f258e3..fc4c1d8 100644
--- a/nx-X11/programs/Xserver/xfixes/cursor.c
+++ b/nx-X11/programs/Xserver/xfixes/cursor.c
@@ -201,7 +201,7 @@ XFixesSelectCursorInput (ClientPtr	pClient,
     }
     if (!e)
     {
-	e = (CursorEventPtr) malloc (sizeof (CursorEventRec));
+	e = (CursorEventPtr) calloc (1, sizeof (CursorEventRec));
 	if (!e)
 	    return BadAlloc;
 
@@ -759,7 +759,7 @@ createCursorHideCount (ClientPtr pClient, ScreenPtr pScreen)
     CursorScreenPtr    cs = GetCursorScreen(pScreen);
     CursorHideCountPtr pChc;
 
-    pChc = (CursorHideCountPtr) malloc(sizeof(CursorHideCountRec));
+    pChc = (CursorHideCountPtr) calloc(1, sizeof(CursorHideCountRec));
     if (pChc == NULL) {
 	return BadAlloc;
     }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list