mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
[vty] Plug memory leak on auto completion.
I assume the original code crashed with a double free as we have a cleanup at the end of the method. Return from the routine like the case label below. This is fixing a memory leak I am experimenting.
This commit is contained in:
@@ -915,7 +915,9 @@ static void vty_complete_command(struct vty *vty)
|
||||
vty_backward_pure_word(vty);
|
||||
vty_insert_word_overwrite(vty, matched[0]);
|
||||
vty_self_insert(vty, ' ');
|
||||
//talloc_free(matched[0]);
|
||||
talloc_free(matched[0]);
|
||||
vector_only_index_free(matched);
|
||||
return;
|
||||
break;
|
||||
case CMD_COMPLETE_MATCH:
|
||||
vty_prompt(vty);
|
||||
|
Reference in New Issue
Block a user