This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/xawtv3.git tree:

Subject: fbtools: close file properly
Author:  Dmitry Butskoy <[email protected]>
Date:    Wed Feb 16 17:21:45 2011 -0200

Derived from OpenSUSE.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 console/fbtools.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/xawtv3.git?a=commitdiff;h=4a89c49a5c428f7d45c9cb5e473de0b5e279343b

diff --git a/console/fbtools.c b/console/fbtools.c
index 148f756..95a7a3b 100644
--- a/console/fbtools.c
+++ b/console/fbtools.c
@@ -174,7 +174,7 @@ fb_setmode(char *name)
 {
     FILE *fp;
     char line[80],label[32],value[16];
-    int  geometry=0, timings=0;
+    int  geometry=0, timings=0, err=-1;
 
     /* load current values */
     if (-1 == ioctl(fb,FBIOGET_VSCREENINFO,&fb_var)) {
@@ -226,7 +226,7 @@ fb_setmode(char *name)
            }
            /* ok ? */
            if (!geometry || !timings)
-               return -1;
+               goto out;
            /* set */
            fb_var.xoffset = 0;
            fb_var.yoffset = 0;
@@ -237,10 +237,14 @@ fb_setmode(char *name)
                perror("ioctl FBIOGET_VSCREENINFO");
                exit(1);
            }
-           return 0;
+           err = 0;
+           goto out;
        }
     }
-    return -1;
+
+out:
+    fclose(fp);
+    return err;
 }
 
 static void

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to