1
0
Преглед на файлове

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 преди 14 години
родител
ревизия
92662b0135
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  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