dvbv5-zap: close dvr_fd at the end of do_traffic_monitor()
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 2 Sep 2014 01:48:22 +0000 (22:48 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 2 Sep 2014 01:48:22 +0000 (22:48 -0300)
As reported by Coverity:

685        close (fd);
CID 1054585 (#1-3 of 3): Resource leak (RESOURCE_LEAK)35. leaked_handle: Handle variable dvr_fd going out of scope leaks the handle.
686        return 0;
687}
688

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
utils/dvb/dvbv5-zap.c

index f49c882..41b5b2f 100644 (file)
@@ -682,7 +682,8 @@ int do_traffic_monitor(struct arguments *args,
                        }
                }
        }
-       close (fd);
+       close(dvr_fd);
+       close(fd);
        return 0;
 }