diff options
author | marha <marha@users.sourceforge.net> | 2011-04-27 15:56:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-27 15:56:59 +0000 |
commit | 100633b3e7619842f345cb7603b0db6b5761dd11 (patch) | |
tree | 3c3af754c7e801c07263269837d6a05072ff834c /libX11/modules/im/ximcp/imTrans.c | |
parent | 205a4bdae76f287126db9f45a4f0ba631e3efca1 (diff) | |
parent | 96d6df5da9cddedf4931bf8e17f96e242467c661 (diff) | |
download | vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.gz vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.bz2 vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.zip |
svn merge ^/branches/released .
Diffstat (limited to 'libX11/modules/im/ximcp/imTrans.c')
-rw-r--r-- | libX11/modules/im/ximcp/imTrans.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libX11/modules/im/ximcp/imTrans.c b/libX11/modules/im/ximcp/imTrans.c index d6c5fc6ad..6d3daee67 100644 --- a/libX11/modules/im/ximcp/imTrans.c +++ b/libX11/modules/im/ximcp/imTrans.c @@ -291,17 +291,14 @@ _XimTransConf( char *paddr;
TransSpecRec *spec;
- if (!(paddr = (char *)Xmalloc(strlen(address) + 1)))
+ if (!(paddr = strdup(address)))
return False;
- if (!(spec = (TransSpecRec *) Xmalloc(sizeof(TransSpecRec)))) {
+ if (!(spec = Xcalloc(1, sizeof(TransSpecRec)))) {
Xfree(paddr);
return False;
}
- bzero(spec, sizeof(TransSpecRec));
-
- (void)strcpy(paddr, address);
spec->address = paddr;
im->private.proto.spec = (XPointer)spec;
|