[PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-04 Thread Ben Skeggs
On Mon, Jul 4, 2011 at 12:39 AM, Marcin Slusarz wrote: > On Sun, Jul 03, 2011 at 01:21:55PM +0200, Jesper Juhl wrote: >> From: Jesper Juhl >> Subject: [PATCH] nouveau: Do not leak in nv20_graph_create >> >> If we return due to an unknown chipset in

[PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Marcin Slusarz
On Sun, Jul 03, 2011 at 01:21:55PM +0200, Jesper Juhl wrote: > From: Jesper Juhl > Subject: [PATCH] nouveau: Do not leak in nv20_graph_create > > If we return due to an unknown chipset in > drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the > memory al

[PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Jesper Juhl
*dev) > > > pgraph->grctx_size = NV35_36_GRCTX_SIZE; > > > break; > > > default: > > > - NV_ERROR(dev, "PGRAPH: unknown chipset\n"); > > > + kfree(pgraph); > >

[PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Jesper Juhl
On Sun, 3 Jul 2011, Paul Menzel wrote: > Dear Jesper, > > > Am Sonntag, den 03.07.2011, 12:25 +0200 schrieb Jesper Juhl: > > If we return due to an unknown chipset in > > drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the > > memory allocated to 'pgraph'. > > > > This

[PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Paul Menzel
Dear Jesper, Am Sonntag, den 03.07.2011, 12:25 +0200 schrieb Jesper Juhl: > If we return due to an unknown chipset in > drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the > memory allocated to 'pgraph'. > > This patch should fix the leak and it also disambiguates the

[PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Jesper Juhl
If we return due to an unknown chipset in drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the memory allocated to 'pgraph'. This patch should fix the leak and it also disambiguates the "PGRAPH: unknown chipset\n" error message - it's nice to be able to tell which branch

[PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Jesper Juhl
If we return due to an unknown chipset in drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the memory allocated to 'pgraph'. This patch should fix the leak and it also disambiguates the PGRAPH: unknown chipset\n error message - it's nice to be able to tell which branch

Re: [PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Paul Menzel
Dear Jesper, Am Sonntag, den 03.07.2011, 12:25 +0200 schrieb Jesper Juhl: If we return due to an unknown chipset in drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the memory allocated to 'pgraph'. This patch should fix the leak and it also disambiguates the PGRAPH:

Re: [PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Jesper Juhl
On Sun, 3 Jul 2011, Paul Menzel wrote: Dear Jesper, Am Sonntag, den 03.07.2011, 12:25 +0200 schrieb Jesper Juhl: If we return due to an unknown chipset in drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the memory allocated to 'pgraph'. This patch should fix

Re: [PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Jesper Juhl
that I guess this is better : From: Jesper Juhl j...@chaosbits.net Subject: [PATCH] nouveau: Do not leak in nv20_graph_create If we return due to an unknown chipset in drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the memory allocated to 'pgraph'. This patch

Re: [PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Marcin Slusarz
On Sun, Jul 03, 2011 at 01:21:55PM +0200, Jesper Juhl wrote: From: Jesper Juhl j...@chaosbits.net Subject: [PATCH] nouveau: Do not leak in nv20_graph_create If we return due to an unknown chipset in drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the memory allocated

Re: [PATCH] nouveau: Do not leak in nv20_graph_create

2011-07-03 Thread Ben Skeggs
On Mon, Jul 4, 2011 at 12:39 AM, Marcin Slusarz marcin.slus...@gmail.com wrote: On Sun, Jul 03, 2011 at 01:21:55PM +0200, Jesper Juhl wrote: From: Jesper Juhl j...@chaosbits.net Subject: [PATCH] nouveau: Do not leak in nv20_graph_create If we return due to an unknown chipset in drivers/gpu