diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-10-20 14:52:57 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-10-20 14:54:58 +0200 |
commit | abafb7e1679f268fea1f5b0f911cb75fcda44857 (patch) | |
tree | ca5fe9572765ba08798343800ebc44129ff2e378 /trafgen_dev.c | |
parent | e843d29eec50dfcad948859b545eaf529731d28e (diff) |
trafgen: fix resource leaks
Fix two resource leaks in trafgen.
Fixes Coverity CID 1381807 and CID 1381811.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_dev.c')
-rw-r--r-- | trafgen_dev.c | 1 |
1 files changed, 1 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; } |