summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-09-26 11:12:47 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2018-12-08 10:06:42 -0800
commit336c1e7a505698a8f3bcb6eb96dbbb8ed21ade96 (patch)
treec2a5af583241115b81004484cabc16ad86f078f2 /modules
parent258a8ced681dc1bc50396be7439fce23f9807e2a (diff)
downloadxorg-lib-libX11-336c1e7a505698a8f3bcb6eb96dbbb8ed21ade96.tar.gz
Replace Xmalloc+strcpy pairs with strdup calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/im/ximcp/imDefIm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/im/ximcp/imDefIm.c b/modules/im/ximcp/imDefIm.c
index 9e877c0b..970df0cf 100644
--- a/modules/im/ximcp/imDefIm.c
+++ b/modules/im/ximcp/imDefIm.c
@@ -330,9 +330,7 @@ _XimPreConnectionIM(
else
goto Error;
}
- if( (locale_name[3] = Xmalloc(llen+1)) != NULL )
- strcpy( locale_name[3], language );
- else
+ if( (locale_name[3] = strdup(language)) == NULL )
goto Error;
if((locales = XInternAtom(display, XIM_LOCALES, True)) == (Atom)None)
goto Error;