tapv2: coverity strikes back 60/17760/2
authorSteven Luong <sluong@cisco.com>
Thu, 21 Feb 2019 22:55:52 +0000 (14:55 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 22 Feb 2019 01:25:49 +0000 (01:25 +0000)
commit4a310d2b50283d5553264caf50ac1aa58384468d
treef6793a8dbe742c62005ca79955dd131d1f539ce3
parent296988d358cd570247dd8b9b8bd5816a856c3d30
tapv2: coverity strikes back

while https://gerrit.fd.io/r/#/c/16590/ fixed the leaked fd which coverity
reported at that time, new coverity run reports simailar leaked fd in a
different goto punt path. It would be nice if coverity reported both of them
at the same time. Or perhaps it did and I just missed it. Anyway, the new fix
is to put the close (fd) statement prior to the return of tap_create_if routine
which should catch all goto's.

Change-Id: I0a51ed3710e32d5d74c9cd9b5066a667153e2f9d
Signed-off-by: Steven Luong <sluong@cisco.com>
src/vnet/devices/tap/tap.c