lkml.org 
[lkml]   [2005]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] device-mapper dm-ioctl: missing put in table load error case
An error path in table_load() forgets to release a table that won't 
now be referenced.

From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-Off-By: Alasdair G Kergon <agk@redhat.com>

Index: linux-2.6.14/drivers/md/dm-ioctl.c
===================================================================
--- linux-2.6.14.orig/drivers/md/dm-ioctl.c 2005-11-14 16:50:11.000000000 +0000
+++ linux-2.6.14/drivers/md/dm-ioctl.c 2005-11-14 16:50:39.000000000 +0000
@@ -974,6 +974,7 @@ static int table_load(struct dm_ioctl *p
if (!hc) {
DMWARN("device doesn't appear to be in the dev hash table.");
up_write(&_hash_lock);
+ dm_table_put(t);
return -ENXIO;
}

-
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: 2005-11-18 15:52    [W:0.024 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site