Instead of copying the value returned by get_prop_name and then releasing it, directly use the return value of get_prop_name, which allocates memory for the name.
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-olive...@nokia.com> Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi> --- src/xlibi18n/XDefaultOMIF.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/xlibi18n/XDefaultOMIF.c b/src/xlibi18n/XDefaultOMIF.c index bb3986a..f4f141c 100644 --- a/src/xlibi18n/XDefaultOMIF.c +++ b/src/xlibi18n/XDefaultOMIF.c @@ -403,9 +403,7 @@ get_font_name( return NULL; } - name = (char*) Xmalloc(strlen(prop_name) + 1); - if (name) - strcpy(name, prop_name); + name = prop_name; XFreeFont(dpy, fs); } -- 1.7.0.4 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel