diff options
| author | Lou Berger <lberger@labn.net> | 2017-10-05 14:57:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-05 14:57:05 -0400 |
| commit | 76ae8092db11aa40198f71424103b484675d4d62 (patch) | |
| tree | 9f6095d8c4c99171f57189db8396870d9f2c9740 /lib/command.c | |
| parent | 9772d7297920b2c6947886488fa2b07ead8e8fe0 (diff) | |
| parent | acdf5e25101bafe334e6b500c3dd0a2babb3c1ec (diff) | |
Merge pull request #1264 from donaldsharp/linklist
Linklist api cleanup
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/command.c b/lib/command.c index d1b0867372..97eba96c3a 100644 --- a/lib/command.c +++ b/lib/command.c @@ -686,7 +686,7 @@ static vector cmd_complete_command_real(vector vline, struct vty *vty, } vector comps = completions_to_vec(completions); - list_delete(completions); + list_delete_and_null(&completions); // set status code appropriately switch (vector_active(comps)) { @@ -1006,7 +1006,7 @@ static int cmd_execute_command_real(vector vline, enum filter_type filter, // if matcher error, return corresponding CMD_ERR if (MATCHER_ERROR(status)) { if (argv_list) - list_delete(argv_list); + list_delete_and_null(&argv_list); switch (status) { case MATCHER_INCOMPLETE: return CMD_ERR_INCOMPLETE; @@ -1035,7 +1035,7 @@ static int cmd_execute_command_real(vector vline, enum filter_type filter, ret = matched_element->func(matched_element, vty, argc, argv); // delete list and cmd_token's in it - list_delete(argv_list); + list_delete_and_null(&argv_list); XFREE(MTYPE_TMP, argv); return ret; @@ -2730,6 +2730,6 @@ void cmd_terminate() if (host.config) XFREE(MTYPE_HOST, host.config); - list_delete(varhandlers); + list_delete_and_null(&varhandlers); qobj_finish(); } |
