[stgt] [PATCH 04/15] Plug memleak: free the mode pages that were added with add_mode_page()

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Fri Jun 12 04:35:49 CEST 2009


On Tue, 09 Jun 2009 18:22:04 +0200
Arne Redlich <arne.redlich at googlemail.com> wrote:

> Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
> ---
>  usr/spc.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/usr/spc.c b/usr/spc.c
> index 2fc8e8e..1a75766 100644
> --- a/usr/spc.c
> +++ b/usr/spc.c
> @@ -1061,5 +1061,8 @@ void spc_lu_exit(struct scsi_lu *lu)
>  		if (lu_vpd[i])
>  			free(lu_vpd[i]);
>  
> +	for (i = 0; i < ARRAY_SIZE(lu->mode_pgs); i++)
> +		if (lu->mode_pgs[i])
> +			free(lu->mode_pgs[i]);
>  }

Merged, thanks!

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list