diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:11:38 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:11:38 +0200 |
commit | 1dbd3c888a3eee51db5303bd93e95b84999f5d31 (patch) | |
tree | 84db92271726b42b8c0864c8b7c77b2330566fc1 /nx-X11/lib/xtrans/Xtransdnet.c | |
parent | 279d37127db241a9ee685f6b671f51aa21a972ea (diff) | |
parent | e85808245810d0cc6918104deef25213d5f9e06c (diff) | |
download | nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.gz nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.bz2 nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.zip |
Merge branch 'sunweaver-pr/backport-Xorg-memory-handling' into 3.6.x
Attributes GH PR #159: https://github.com/ArcticaProject/nx-libs/pull/159
Reviewed by: Vadim Troshchinskiy <vadim@qindel.com> -- Fri, 01 Jul 2016 12:47:46 -0700
Diffstat (limited to 'nx-X11/lib/xtrans/Xtransdnet.c')
-rw-r--r-- | nx-X11/lib/xtrans/Xtransdnet.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/nx-X11/lib/xtrans/Xtransdnet.c b/nx-X11/lib/xtrans/Xtransdnet.c index a1728f187..00a086277 100644 --- a/nx-X11/lib/xtrans/Xtransdnet.c +++ b/nx-X11/lib/xtrans/Xtransdnet.c @@ -121,7 +121,7 @@ TRANS(DNETGetAddr) (XtransConnInfo ciptr) * Everything looks good: fill in the XtransConnInfo structure. */ - if ((ciptr->addr = (char *) xalloc (namelen)) == NULL) + if ((ciptr->addr = (char *) malloc (namelen)) == NULL) { PRMSG (1, "DNETGetAddr: Can't allocate space for the addr\n", 0, 0, 0); @@ -161,7 +161,7 @@ TRANS(DNETGetPeerAddr) (XtransConnInfo ciptr) * Everything looks good: fill in the XtransConnInfo structure. */ - if ((ciptr->peeraddr = (char *) xalloc (namelen)) == NULL) + if ((ciptr->peeraddr = (char *) malloc (namelen)) == NULL) { PRMSG (1, "DNETGetPeerAddr: Can't allocate space for the addr\n", @@ -187,7 +187,7 @@ TRANS(DNETOpenCOTSClient) (Xtransport *thistrans, char *protocol, PRMSG (2,"DNETOpenCOTSClient(%s,%s,%s)\n", protocol, host, port); - if ((ciptr = (XtransConnInfo) xcalloc ( + if ((ciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "DNETOpenCOTSClient: malloc failed\n", 0, 0, 0); @@ -215,7 +215,7 @@ TRANS(DNETOpenCOTSServer) (Xtransport *thistrans, char *protocol, PRMSG (2,"DNETOpenCOTSServer(%s,%s,%s)\n", protocol, host, port); - if ((ciptr = (XtransConnInfo) xcalloc ( + if ((ciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "DNETOpenCOTSServer: malloc failed\n", 0, 0, 0); @@ -224,7 +224,7 @@ TRANS(DNETOpenCOTSServer) (Xtransport *thistrans, char *protocol, if ((ciptr->fd = socket (AF_DECnet, SOCK_STREAM, 0)) < 0) { - xfree ((char *) ciptr); + free ((char *) ciptr); return NULL; } @@ -247,7 +247,7 @@ TRANS(DNETOpenCLTSClient) (Xtransport *thistrans, char *protocol, PRMSG (2,"DNETOpenCLTSClient(%s,%s,%s)\n", protocol, host, port); - if ((ciptr = (XtransConnInfo) xcalloc ( + if ((ciptr = (XtransConnInfo) calloc ( 1, sizeof (struct _XtransConnInfo))) == NULL) { PRMSG (1, "DNETOpenCLTSClient: malloc failed\n", 0, 0, 0); @@ -290,7 +290,7 @@ TRANS(DNETReopenCOTSServer) (Xtransport *thistrans, int fd, char *port) PRMSG (2,"DNETReopenCOTSServer(%d,%s)\n", fd, port, 0); - if ((ciptr = (XtransConnInfo) xcalloc ( + if ((ciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "DNETReopenCOTSServer: malloc failed\n", 0, 0, 0); @@ -311,7 +311,7 @@ TRANS(DNETReopenCLTSServer) (Xtransport *thistrans, int fd, char *port) PRMSG (2,"DNETReopenCLTSServer(%d,%s)\n", fd, port, 0); - if ((ciptr = (XtransConnInfo) xcalloc ( + if ((ciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "DNETReopenCLTSServer: malloc failed\n", 0, 0, 0); @@ -393,7 +393,7 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status) PRMSG (2, "DNETAccept(%x,%d)\n", ciptr, ciptr->fd, 0); - if ((newciptr = (XtransConnInfo) xcalloc( + if ((newciptr = (XtransConnInfo) calloc( 1, sizeof (struct _XtransConnInfo))) == NULL) { PRMSG (1, "DNETAccept: malloc failed\n", 0, 0, 0); @@ -406,7 +406,7 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status) { PRMSG (1, "DNETAccept: accept() failed\n", 0, 0, 0); - xfree (newciptr); + free (newciptr); *status = TRANS_ACCEPT_FAILED; return NULL; } @@ -421,7 +421,7 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status) PRMSG(1, "DNETAccept: ...DNETGetAddr() failed:\n", 0, 0, 0); close (newciptr->fd); - xfree (newciptr); + free (newciptr); *status = TRANS_ACCEPT_MISC_ERROR; return NULL; } @@ -432,8 +432,8 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status) "DNETAccept: ...DNETGetPeerAddr() failed:\n", 0, 0, 0); close (newciptr->fd); - if (newciptr->addr) xfree (newciptr->addr); - xfree (newciptr); + if (newciptr->addr) free (newciptr->addr); + free (newciptr); *status = TRANS_ACCEPT_MISC_ERROR; return NULL; } |