xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs: fix potential memory leak in repare/sb.c

To: Li Zhong <zhong@xxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs: fix potential memory leak in repare/sb.c
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Wed, 18 Sep 2013 11:26:54 -0500
Cc: xfsprogs <xfs@xxxxxxxxxxx>, Chandra Seetharaman <sekharan@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1379497242.5874.7.camel@ThinkPad-T5421>
References: <1379497242.5874.7.camel@ThinkPad-T5421>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 09/18/13 04:40, Li Zhong wrote:
Following Resource leak is reported by coverity:

CID 997011 (#1 of 1): Resource leak (RESOURCE_LEAK)6. leaked_storage:
Variable "buf" going out of scope leaks the storage it points to.
505                return(XR_EOF);

Add a free(buf) to solve it.

Signed-off-by: Li Zhong<zhong@xxxxxxxxxxxxxxxxxx>
---

Looks good.

Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>