From 88bc52615cdc3d348d1d6565e9ea40b23c226b29 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 12 Aug 2017 17:38:35 +0200 Subject: Keyboard.c: set variables to NULL after free --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 1cb5cc9d7..951c30cc8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1065,6 +1065,7 @@ XkbError: ErrorF("Error parsing config file.\n"); free(nxagentXkbConfigFilePath); + nxagentXkbConfigFilePath = NULL; fclose(file); goto XkbError; @@ -1095,6 +1096,7 @@ XkbError: options = config.options; free(nxagentXkbConfigFilePath); + nxagentXkbConfigFilePath = NULL; fclose(file); } @@ -1114,6 +1116,7 @@ XkbError: nxagentBell, nxagentChangeKeyboardControl); free(nxagentXkbConfigFilePath); + nxagentXkbConfigFilePath = NULL; if (!nxagentKeyboard || strcmp(nxagentKeyboard, "query") == 0) { -- cgit v1.2.3