[sheepdog] [PATCH] lib/work: kill a possible memory leaker

Liu Yuan namei.unix at gmail.com
Mon Feb 17 10:29:07 CET 2014


On Fri, Feb 14, 2014 at 03:13:47PM +0800, Liu Yuan wrote:
> Though in reality, this wouldn't happen.
> 
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
>  lib/work.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/work.c b/lib/work.c
> index d483136..35413ff 100644
> --- a/lib/work.c
> +++ b/lib/work.c
> @@ -428,6 +428,7 @@ destroy_threads:
>  	sd_destroy_cond(&wi->pending_cond);
>  	sd_destroy_mutex(&wi->pending_lock);
>  	sd_destroy_mutex(&wi->finished_lock);
> +	free(wi);
>  
>  	return NULL;
>  }
> -- 
> 1.8.1.2
> 

Applied 

Yuan


More information about the sheepdog mailing list