summaryrefslogtreecommitdiff
path: root/extcap_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'extcap_parser.c')
-rw-r--r--extcap_parser.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/extcap_parser.c b/extcap_parser.c
index dc74b2588f..4228bc5bd3 100644
--- a/extcap_parser.c
+++ b/extcap_parser.c
@@ -256,6 +256,7 @@ void extcap_free_tokenized_sentence(extcap_token_sentence *s) {
extcap_free_tokenized_param(tv);
}
+ g_free(s);
}
void extcap_free_tokenized_sentence_list(extcap_token_sentence *f) {
@@ -427,14 +428,19 @@ extcap_interface *extcap_new_interface(void) {
}
void extcap_free_interface(extcap_interface *i) {
- if (i == NULL)
- return;
+ extcap_interface *next_i = i;
+
+ while (i) {
+ next_i = i->next_interface;
+ if (i->call != NULL)
+ g_free(i->call);
- if (i->call != NULL)
- g_free(i->call);
+ if (i->display != NULL)
+ g_free(i->display);
- if (i->display != NULL)
- g_free(i->display);
+ g_free(i);
+ i = next_i;
+ }
}
extcap_dlt *extcap_new_dlt(void) {