lkml.org 
[lkml]   [2004]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 2/2: device-mapper trivial: duplicate kfree in error path
Remove duplicate kfree in dm_register_target error path.

Signed-Off-By: Alasdair G Kergon <agk@redhat.com>
--- diff/drivers/md/dm-target.c 2004-06-30 14:25:46.000000000 +0100
+++ source/drivers/md/dm-target.c 2004-10-19 16:53:56.000000000 +0100
@@ -120,10 +120,9 @@
return -ENOMEM;

down_write(&_lock);
- if (__find_target_type(t->name)) {
- kfree(ti);
+ if (__find_target_type(t->name))
rv = -EEXIST;
- } else
+ else
list_add(&ti->list, &_targets);

up_write(&_lock);
-
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-03-22 14:07    [W:0.023 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site