summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oui.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/oui.c b/oui.c
index 5eea9fb..b537e1e 100644
--- a/oui.c
+++ b/oui.c
@@ -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');