This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-utils.git tree:
Subject: v4l2-ctl: Do not leak framebuffer handle in error paths Author: Gregor Jasny <[email protected]> Date: Wed Apr 23 09:28:46 2014 +0200 Detected by Coverity Signed-off-by: Gregor Jasny <[email protected]> Acked-by: Hans Verkuil <[email protected]> utils/v4l2-ctl/v4l2-ctl-overlay.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=5d3993cd6912cf086f44aadbaee6c4d5f7acd37c diff --git a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp index 5bc99a5..38bb346 100644 --- a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp @@ -161,6 +161,7 @@ static void find_fb(int fd) if (si.smem_start == (unsigned long)fbuf.base) { printf("%s is the framebuffer associated with base address %p\n", dev_name, fbuf.base); + close(fb_fd); return; } close(fb_fd); @@ -211,10 +212,12 @@ static int fbuf_fill_from_fb(struct v4l2_framebuffer &fb, const char *fb_device) } if (ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) { fprintf(stderr, "could not obtain fscreeninfo from %s\n", fb_device); + close(fb_fd); return -1; } if (ioctl(fb_fd, FBIOGET_VSCREENINFO, &vi)) { fprintf(stderr, "could not obtain vscreeninfo from %s\n", fb_device); + close(fb_fd); return -1; } fb.base = (void *)si.smem_start; @@ -224,6 +227,7 @@ static int fbuf_fill_from_fb(struct v4l2_framebuffer &fb, const char *fb_device) fb.fmt.bytesperline = si.line_length; if (fb.fmt.height * fb.fmt.bytesperline > fb.fmt.sizeimage) { fprintf(stderr, "height * bytesperline > sizeimage?!\n"); + close(fb_fd); return -1; } fb.fmt.pixelformat = 0; _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
