Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1 /drivers/video/sbusfb.c

Filename:/drivers/video/sbusfb.c
Lines Added:5
Lines Deleted:1
Also changed in: (Previous) 2.4.1-pre12  2.4.0-test8  2.4.0-test5  2.4.0-test2  2.2.0-final 
(Following) 2.4.1-ac9  2.4.1-ac10  2.4.1-ac11  2.4.1-ac12  2.4.1-ac13  2.4.1-ac14 

Location
[  2.4.1
  [  drivers
    [  video
       o  sbusfb.c

Patch

diff -u --recursive --new-file v2.4.0/linux/drivers/video/sbusfb.c linux/drivers/video/sbusfb.c
--- v2.4.0/linux/drivers/video/sbusfb.c   Tue Aug 29 14:09:15 2000
+++ linux/drivers/video/sbusfb.c   Mon Jan 29 08:08:46 2001
@@ -678,7 +678,7 @@
       int end, count, index;
       struct fbcmap *cmap;
       
-      if (!fb->loadcmap)
+      if (!fb->loadcmap || !fb->color_map)
          return -EINVAL;
       i = verify_area (VERIFY_READ, (void *) arg, sizeof (struct fbcmap));
       if (i) return i;
@@ -1110,6 +1110,8 @@
    }
    
    if (!p) {
+      if (fb->color_map)
+         kfree(fb->color_map);
       kfree(fb);
       return;
    }
@@ -1147,6 +1149,8 @@
    sbusfb_set_var(var, -1, &fb->info);
 
    if (register_framebuffer(&fb->info) < 0) {
+      if (fb->color_map)
+         kfree(fb->color_map);
       kfree(fb);
       return;
    }


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.