opensubscriber
   Find in this group all groups
 
Unknown more information…

x : xfs@oss.sgi.com 18 September 2009 • 12:54PM -0400

Re: [PATCH] xfs_repair: fix record_allocation list manipulation
by Eric Sandeen

REPLY TO AUTHOR
 
REPLY TO GROUP




Eric Sandeen wrote:
> clang found this one too as a "Dead assignment"
>
> Unless my pointer-fu is totally messed up, this function
> was never actually updating the list head.
>
> This would mean that the later free_allocations() calls in
> incore_ext_teardown() and free_rt_dup_extent_tree() don't
> actually free more than one item, and therefore leak memory.
>
> Signed-off-by: Eric Sandeen <sandeen@sand...>
> ---
>
> clang record:
> http://sandeen.net/clang/xfsprogs/2009-09-09-1/report-1Jnl15.html#EndPath
>
> diff --git a/repair/incore.c b/repair/incore.c
> index 84626c9..77f4630 100644
> --- a/repair/incore.c
> +++ b/repair/incore.c
> @@ -33,7 +33,7 @@ void
> record_allocation(ba_rec_t *addr, ba_rec_t *list)
> {
>     addr->next = list;
> -    list = addr;
> +    *list = addr;

argh that's not right, I swear I built it, oops.

Will send an update later.

>
>     return;
> }
>
> _______________________________________________
> xfs mailing list
> xfs@oss....
> http://oss.sgi.com/mailman/listinfo/xfs
>

_______________________________________________
xfs mailing list
xfs@oss....
http://oss.sgi.com/mailman/listinfo/xfs

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.