From 4cf06dbbcb8522be5fa069976c8f361fc874039f Mon Sep 17 00:00:00 2001 From: Nicola Ruggero Date: Wed, 3 Nov 2010 16:59:26 +0100 Subject: Major code cleanup: - Initialized and zeroed out local variables - Check for some null pointers - Fixed some typos - Other minor changes (beautify, etc.) --- xrdp/xrdp_wm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xrdp/xrdp_wm.c') diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index bae6c494..7500f38a 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -27,9 +27,12 @@ struct xrdp_wm* APP_CC xrdp_wm_create(struct xrdp_process* owner, struct xrdp_client_info* client_info) { - struct xrdp_wm* self; + struct xrdp_wm* self = (struct xrdp_wm *)NULL; char event_name[256]; - int pid; + int pid = 0; + + /* initialize (zero out) local variables: */ + g_memset(event_name,0,sizeof(char) * 256); self = (struct xrdp_wm*)g_malloc(sizeof(struct xrdp_wm), 1); self->client_info = client_info; -- cgit v1.2.1