From 35b336272b5ee4e2c30d622230c6a71b03b76082 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sun, 13 Nov 2016 08:46:08 -0800 Subject: [PATCH] Fix compilation with C++ --- sesman/chansrv/chansrv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 2d2160fc..c7ce1f48 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -1400,7 +1400,7 @@ get_log_path() log_path = g_getenv("XDG_DATA_HOME"); if (log_path != 0) { - cp = malloc(strlen(log_path) + strlen("/xrdp") + 1); + cp = g_new(char, strlen(log_path) + strlen("/xrdp") + 1); if (cp != 0) { @@ -1423,7 +1423,7 @@ get_log_path() log_path = g_getenv("HOME"); if (log_path != 0) { - cp = malloc(strlen(log_path) + strlen("/.local/share/xrdp") + 1); + cp = g_new(char, strlen(log_path) + strlen("/.local/share/xrdp") + 1); if (cp != 0) {