From 7a8a54acdce6e40f466f94107949e8c622b96f1d Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Mon, 13 Mar 2006 00:24:09 +0000 Subject: [PATCH] fix crash when typing a username in --- xrdp/xrdp_login_wnd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index 71c00e87..855fd02d 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -473,8 +473,7 @@ xrdp_wm_show_edits(struct xrdp_wm* self, struct xrdp_bitmap* combo) } if (g_strncmp(name, "username", 255) == 0) { - g_free(b->caption1); - b->caption1 = g_strdup(self->session->client_info->username); + g_strcpy(b->caption1, self->session->client_info->username); b->edit_pos = g_strlen(b->caption1); if (g_strlen(b->caption1) > 0) {