From: Mauro Carvalho Chehab Date: Tue, 2 Sep 2014 01:48:22 +0000 (-0300) Subject: dvbv5-zap: close dvr_fd at the end of do_traffic_monitor() X-Git-Tag: v4l-utils-1.4.0~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ccad0b1e4c399976106f279cd90936e658878972;p=platform%2Fupstream%2Fv4l-utils.git dvbv5-zap: close dvr_fd at the end of do_traffic_monitor() 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 --- diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c index f49c882..41b5b2f 100644 --- a/utils/dvb/dvbv5-zap.c +++ b/utils/dvb/dvbv5-zap.c @@ -682,7 +682,8 @@ int do_traffic_monitor(struct arguments *args, } } } - close (fd); + close(dvr_fd); + close(fd); return 0; }