lkml.org 
[lkml]   [2006]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fix potential resource leak in drivers/pci/msi.c
Date
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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-17 04:06    [W:0.031 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site