Skip to content

Commit

Permalink
[PATCH] device-mapper dm-ioctl: missing put in table load error case
Browse files Browse the repository at this point in the history
An error path in table_load() forgets to release a table that won't now be
referenced.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Kiyoshi Ueda authored and Linus Torvalds committed Nov 22, 2005
1 parent 98766fb commit b6fcc80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/dm-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
if (!hc) {
DMWARN("device doesn't appear to be in the dev hash table.");
up_write(&_hash_lock);
dm_table_put(t);
return -ENXIO;
}

Expand Down

0 comments on commit b6fcc80

Please sign in to comment.