diff mbox

libmultipath: fix missing dm_task_destroy() in dm_reassign()

Message ID 1478484077-9740-1-git-send-email-zhou.guichun@zte.com.cn (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

zhou.guichun@zte.com.cn Nov. 7, 2016, 2:01 a.m. UTC
From: "zhou.guichun" <zhou.guichun@zte.com.cn>

dm_task should be destoryed before going out of dm_reassign()

Signed-off-by: zhou.guichun <zhou.guichun@zte.com.cn>
---
 libmultipath/devmapper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Christophe Varoqui Nov. 20, 2016, 1:36 p.m. UTC | #1
Merged.
Thanks.

On Mon, Nov 7, 2016 at 3:01 AM, <zhou.guichun@zte.com.cn> wrote:

> From: "zhou.guichun" <zhou.guichun@zte.com.cn>
>
> dm_task should be destoryed before going out of dm_reassign()
>
> Signed-off-by: zhou.guichun <zhou.guichun@zte.com.cn>
> ---
>  libmultipath/devmapper.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> index 5aea5b6..e9d13b6 100644
> --- a/libmultipath/devmapper.c
> +++ b/libmultipath/devmapper.c
> @@ -1582,10 +1582,9 @@ int dm_reassign(const char *mapname)
>                 sysfs_check_holders(dm_dep, dev_t);
>         }
>
> -       dm_task_destroy (dmt);
> -
>         r = 1;
>  out:
> +       dm_task_destroy (dmt);
>         return r;
>  }
>
> --
> 2.8.1.windows.1
>
>
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index 5aea5b6..e9d13b6 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -1582,10 +1582,9 @@  int dm_reassign(const char *mapname)
 		sysfs_check_holders(dm_dep, dev_t);
 	}
 
-	dm_task_destroy (dmt);
-
 	r = 1;
 out:
+	dm_task_destroy (dmt);
 	return r;
 }