summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trafgen_dev.c1
-rw-r--r--trafgen_parser.y1
2 files changed, 2 insertions, 0 deletions
diff --git a/trafgen_dev.c b/trafgen_dev.c
index 489da98..b01a96d 100644
--- a/trafgen_dev.c
+++ b/trafgen_dev.c
@@ -257,6 +257,7 @@ struct dev_io *dev_io_create(const char *name, enum dev_io_mode_t mode)
dev->name = xstrndup(name, IFNAMSIZ);
dev->ops = &dev_net_ops;
} else {
+ free(dev);
fprintf(stderr, "No networking device or pcap file: %s\n", name);
return NULL;
}
diff --git a/trafgen_parser.y b/trafgen_parser.y
index 38f170a..a42dc30 100644
--- a/trafgen_parser.y
+++ b/trafgen_parser.y
@@ -1360,6 +1360,7 @@ dns_rrecord_data_fqdn
str[strlen($1 + 1) - 1] = '\0';
fqdn = str2fqdn(str);
proto_hdr_field_set_bytes(hdr, DNS_RRECORD_DATA, (uint8_t *) fqdn, strlen(fqdn) + 1);
+ xfree(str);
xfree(fqdn); }
;