* [PATCH 10/15] sunxvr500: fix cmap memory leaks
@ 2009-02-07 17:15 Andres Salomon
2009-02-09 0:59 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Andres Salomon @ 2009-02-07 17:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-fbdev-devel, adaplas
- fix cmap leak in removal path
- fix cmap leak when register_framebuffer fails
Signed-off-by: Andres Salomon <dilinger@debian.org>
---
drivers/video/sunxvr500.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sunxvr500.c b/drivers/video/sunxvr500.c
index c2ba51b..18b9507 100644
--- a/drivers/video/sunxvr500.c
+++ b/drivers/video/sunxvr500.c
@@ -349,11 +349,14 @@ static int __devinit e3d_pci_register(struct pci_dev *pdev,
if (err < 0) {
printk(KERN_ERR "e3d: Could not register framebuffer %s\n",
pci_name(pdev));
- goto err_unmap_fb;
+ goto err_free_cmap;
}
return 0;
+err_free_cmap:
+ fb_dealloc_cmap(&info->cmap);
+
err_unmap_fb:
iounmap(ep->fb_base);
@@ -389,6 +392,7 @@ static void __devexit e3d_pci_unregister(struct pci_dev *pdev)
pci_release_region(pdev, 0);
pci_release_region(pdev, 1);
+ fb_dealloc_cmap(&info->cmap);
framebuffer_release(info);
pci_disable_device(pdev);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 10/15] sunxvr500: fix cmap memory leaks
2009-02-07 17:15 [PATCH 10/15] sunxvr500: fix cmap memory leaks Andres Salomon
@ 2009-02-09 0:59 ` David Miller
2009-02-09 1:50 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-02-09 0:59 UTC (permalink / raw)
To: dilinger; +Cc: akpm, linux-kernel, linux-fbdev-devel, adaplas
From: Andres Salomon <dilinger@queued.net>
Date: Sat, 7 Feb 2009 12:15:40 -0500
[ Fixed typo in adaplas's email address ]
> - fix cmap leak in removal path
> - fix cmap leak when register_framebuffer fails
>
> Signed-off-by: Andres Salomon <dilinger@debian.org>
I assume the fbdev folks will pick this up or should I take
it in my sparc tree?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 10/15] sunxvr500: fix cmap memory leaks
2009-02-09 0:59 ` David Miller
@ 2009-02-09 1:50 ` Andrew Morton
2009-02-09 1:51 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2009-02-09 1:50 UTC (permalink / raw)
To: David Miller; +Cc: dilinger, linux-kernel, linux-fbdev-devel, adaplas
On Sun, 08 Feb 2009 16:59:25 -0800 (PST) David Miller <davem@davemloft.net> wrote:
> From: Andres Salomon <dilinger@queued.net>
> Date: Sat, 7 Feb 2009 12:15:40 -0500
>
> [ Fixed typo in adaplas's email address ]
>
> > - fix cmap leak in removal path
> > - fix cmap leak when register_framebuffer fails
> >
> > Signed-off-by: Andres Salomon <dilinger@debian.org>
>
> I assume the fbdev folks will pick this up or should I take
> it in my sparc tree?
(fbdev folks == me) at present. I'll crunch on these 15 patches
tomorrow. If you want to queue it in in a sparc tree so that it gets
more-than-zero runtine testing then go for it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 10/15] sunxvr500: fix cmap memory leaks
2009-02-09 1:50 ` Andrew Morton
@ 2009-02-09 1:51 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-02-09 1:51 UTC (permalink / raw)
To: akpm; +Cc: dilinger, linux-kernel, linux-fbdev-devel, adaplas
From: Andrew Morton <akpm@linux-foundation.org>
Date: Sun, 8 Feb 2009 17:50:24 -0800
> On Sun, 08 Feb 2009 16:59:25 -0800 (PST) David Miller <davem@davemloft.net> wrote:
>
> > From: Andres Salomon <dilinger@queued.net>
> > Date: Sat, 7 Feb 2009 12:15:40 -0500
> >
> > [ Fixed typo in adaplas's email address ]
> >
> > > - fix cmap leak in removal path
> > > - fix cmap leak when register_framebuffer fails
> > >
> > > Signed-off-by: Andres Salomon <dilinger@debian.org>
> >
> > I assume the fbdev folks will pick this up or should I take
> > it in my sparc tree?
>
> (fbdev folks == me) at present. I'll crunch on these 15 patches
> tomorrow. If you want to queue it in in a sparc tree so that it gets
> more-than-zero runtine testing then go for it.
Nah, you can take it, thanks Andrew :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-09 1:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-07 17:15 [PATCH 10/15] sunxvr500: fix cmap memory leaks Andres Salomon
2009-02-09 0:59 ` David Miller
2009-02-09 1:50 ` Andrew Morton
2009-02-09 1:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).