summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2012-06-18 15:25:26 +0800
committerGuodong Xu <guodong.xu@linaro.org>2012-06-18 15:25:26 +0800
commit8b08b96fb7378cd40b7faccb94f6df4773b32b67 (patch)
treea4921c5203a750cc92ce6c553357d48a9d6c79a7
parenteb0c9b7df96e98b125cff27c70e8a566c9e50e3a (diff)
Bug fix: segmetation fault when wrong commandline input
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 881738d..bf71b39 100644
--- a/main.c
+++ b/main.c
@@ -1202,7 +1202,8 @@ int free_resources()
ptr_test_node = stm_test_node_list;
- if (is_commandline_mode) { /* there is only one node to release */
+ if (is_commandline_mode && ptr_test_node != NULL) {
+ /* there is only one node to release */
/* and no need to free param_array */
/* free prvate data */
if (ptr_test_node->command_result->private_data != NULL) {