* [PATCH] fix potential resource leak in drivers/pci/msi.c
@ 2006-04-17 2:02 Jesper Juhl
0 siblings, 0 replies; only message in thread
From: Jesper Juhl @ 2006-04-17 2:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Tom Long Nguyen, Jesper Juhl
The coverity checker spotted (as entry #599) that we might leak `entry' in
drivers/pci/msi.c::msix_capability_init()
This patch should take care of that.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
--- linux-2.6.17-rc1-git12-orig/drivers/pci/msi.c 2006-04-16 11:23:18.000000000 +0200
+++ linux-2.6.17-rc1-git12/drivers/pci/msi.c 2006-04-17 03:59:14.000000000 +0200
@@ -793,8 +793,10 @@ static int msix_capability_init(struct p
if (!entry)
break;
vector = get_msi_vector(dev);
- if (vector < 0)
+ if (vector < 0) {
+ kmem_cache_free(msi_cachep, entry);
break;
+ }
j = entries[i].entry;
entries[i].vector = vector;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-17 2:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-17 2:02 [PATCH] fix potential resource leak in drivers/pci/msi.c Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox