| Kernel v2.4.1 /drivers/video/sbusfb.c |
|---|
 2.4.1
 drivers
 video
 sbusfb.c
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;
}
|