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

Robin Dong robin.k.dong at gmail.com
Mon Feb 17 10:04:07 CET 2014


Reviewed-by: Robin Dong <sanbai at taobao.com>


2014-02-14 15:13 GMT+08:00 Liu Yuan <namei.unix at gmail.com>:

> 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
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
>



-- 
--
Best Regard
Robin Dong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20140217/897fe414/attachment-0004.html>


More information about the sheepdog mailing list