Browse Source

Fix segmentation when the path of konfd socket is NULL.

git-svn-id: https://klish.googlecode.com/svn/trunk@244 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 years ago
parent
commit
92662b0135
1 changed files with 4 additions and 1 deletions
  1. 4 1
      clish/clish_config_callback.c

+ 4 - 1
clish/clish_config_callback.c

@@ -37,6 +37,10 @@ bool_t clish_config_callback(const clish_shell_t * this,
 	if (!this)
 		return BOOL_TRUE;
 
+	client = clish_shell__get_client(this);
+	if (!client)
+		return BOOL_TRUE;
+
 	viewid = clish_shell__get_viewid(this);
 	op = clish_command__get_cfg_op(cmd);
 
@@ -131,7 +135,6 @@ bool_t clish_config_callback(const clish_shell_t * this,
 		lub_string_free(str);
 	}
 
-	client = clish_shell__get_client(this);
 #ifdef DEBUG
 	fprintf(stderr, "CONFIG request: %s\n", command);
 #endif