aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules/im/ximcp/imTrans.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/modules/im/ximcp/imTrans.c')
-rw-r--r--libX11/modules/im/ximcp/imTrans.c7
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;