diff options
Diffstat (limited to 'libX11/modules/im/ximcp')
-rw-r--r-- | libX11/modules/im/ximcp/imLcPrs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libX11/modules/im/ximcp/imLcPrs.c b/libX11/modules/im/ximcp/imLcPrs.c index f6c42daa8..f5d6f8cd1 100644 --- a/libX11/modules/im/ximcp/imLcPrs.c +++ b/libX11/modules/im/ximcp/imLcPrs.c @@ -321,7 +321,8 @@ TransFileName(Xim im, char *name) l += strlen(home);
break;
case 'L':
- lcCompose = _XlcFileName(im->core.lcd, COMPOSE_FILE);
+ if (lcCompose == NULL)
+ lcCompose = _XlcFileName(im->core.lcd, COMPOSE_FILE);
if (lcCompose)
l += strlen(lcCompose);
break;
@@ -357,7 +358,6 @@ TransFileName(Xim im, char *name) if (lcCompose) {
strcpy(j, lcCompose);
j += strlen(lcCompose);
- Xfree(lcCompose);
}
break;
case 'S':
@@ -371,6 +371,7 @@ TransFileName(Xim im, char *name) }
}
*j = '\0';
+ Xfree(lcCompose);
return ret;
}
|