diff options
author | Guodong Xu <guodong.xu@linaro.org> | 2012-06-18 15:25:26 +0800 |
---|---|---|
committer | Guodong Xu <guodong.xu@linaro.org> | 2012-06-18 15:25:26 +0800 |
commit | 8b08b96fb7378cd40b7faccb94f6df4773b32b67 (patch) | |
tree | a4921c5203a750cc92ce6c553357d48a9d6c79a7 | |
parent | eb0c9b7df96e98b125cff27c70e8a566c9e50e3a (diff) |
Bug fix: segmetation fault when wrong commandline input
-rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |