trafgen: fix NULL pointer dereference in -i option parsing
commit9addb47bec772b53a66c39efdd404290300d0e86
authorTobias Klauser <tklauser@distanz.ch>
Fri, 20 Oct 2017 13:10:41 +0000 (20 15:10 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Fri, 20 Oct 2017 13:10:41 +0000 (20 15:10 +0200)
tree71f86f9157a8b265f1e0db483aabda571fca2465
parentabafb7e1679f268fea1f5b0f911cb75fcda44857
trafgen: fix NULL pointer dereference in -i option parsing

If trafgen is called with the -i option, it currently crashes due to an
NULL pointer dereference. Fix it.

Fixes Coverity CID 1381809
Fixes: 82a3c204c6f1 ("trafgen: Allow send packets from pcap file")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
trafgen.c