From: Eric Leblond Date: Tue, 28 Aug 2018 20:46:25 +0000 (+0200) Subject: af-packet: close the socket in case of early fail X-Git-Tag: suricata-4.0.6~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37d10d3537841045495fe111121e73b2d68fa49a;p=thirdparty%2Fsuricata.git af-packet: close the socket in case of early fail --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 8a6edca696..4b3c2f6f7a 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -1930,7 +1930,7 @@ static int AFPCreateSocket(AFPThreadVars *ptv, char *devname, int verbose) if_idx = AFPGetIfnumByDev(ptv->socket, devname, verbose); if (if_idx == -1) { - goto error; + goto socket_err; } /* bind socket */