aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/lcPubWrap.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-12-19 18:03:41 -0800
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:30 +0200
commit50192b720a1f0ae6c4dd97d44e3c54d43ab7358b (patch)
tree6abaea15b6bb726c132ade1e9fac068af23ea791 /nx-X11/lib/X11/lcPubWrap.c
parent7a1fc175980837ccc25cdd8582846a3b44838505 (diff)
downloadnx-libs-50192b720a1f0ae6c4dd97d44e3c54d43ab7358b.tar.gz
nx-libs-50192b720a1f0ae6c4dd97d44e3c54d43ab7358b.tar.bz2
nx-libs-50192b720a1f0ae6c4dd97d44e3c54d43ab7358b.zip
lcPubWrap: replace malloc(strlen) + strcpy with strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/lcPubWrap.c')
-rw-r--r--nx-X11/lib/X11/lcPubWrap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/nx-X11/lib/X11/lcPubWrap.c b/nx-X11/lib/X11/lcPubWrap.c
index d1096d570..3119918c6 100644
--- a/nx-X11/lib/X11/lcPubWrap.c
+++ b/nx-X11/lib/X11/lcPubWrap.c
@@ -78,10 +78,9 @@ _XlcCreateLC(
return (XLCd) NULL;
if (lcd->core->name == NULL) {
- lcd->core->name = Xmalloc(strlen(name) + 1);
+ lcd->core->name = strdup(name);
if (lcd->core->name == NULL)
goto err;
- strcpy(lcd->core->name, name);
}
if (lcd->methods == NULL)