diff options
Diffstat (limited to 'oui.c')
-rw-r--r-- | oui.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -56,13 +56,17 @@ void dissector_init_oui(void) v = xmalloc(sizeof(*v)); v->id = strtol(ptr, &end, 0); /* not a valid line, skip */ - if (v->id == 0 && end == ptr) + if (v->id == 0 && end == ptr) { + xfree(v); continue; + } ptr = strstr(buff, ", "); /* likewise */ - if (!ptr) + if (!ptr) { + xfree(v); continue; + } ptr += strlen(", "); ptr = strtrim_right(ptr, '\n'); |