| To: | Li Zhong <zhong@xxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] xfsprogs: fix potential memory leak in verify_set_primary_sb() |
| From: | Mark Tinguely <tinguely@xxxxxxx> |
| Date: | Tue, 24 Sep 2013 13:59:49 -0500 |
| Cc: | xfsprogs <xfs@xxxxxxxxxxx>, Chandra Seetharaman <sekharan@xxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1379829679.4089.2.camel@ThinkPad-T5421> |
| References: | <1379829679.4089.2.camel@ThinkPad-T5421> |
| User-agent: | Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0 |
On 09/22/13 01:01, Li Zhong wrote: This patch tries to fix CID 997012, 997013 and 997014 reported by Coverity scan, as suggested by sekharan. Signed-off-by: Li Zhong<zhong@xxxxxxxxxxxxxxxxxx> ---
Looks good. list, sb and check could have been allocated at this point.
Isn't the list been added to before the conditional in the for loop?:
list = add_geo(list, &geo, sb_index);
/*
* grab N secondaries. check them off as we get them
* so we only process each one once
*/
for (round = 0; round < skip; round++) {
...
if (get_sb(sb, off, size, agno) == XR_EOF) {
retval = 1;
goto out;
^^^^^^^^^ out_free_list?
}
--Mark.
|
| Previous by Date: | Re: [PATCH] xfsprogs: fix potential memory free issues in quota_group_type(), Mark Tinguely |
|---|---|
| Next by Date: | Re: [PATCH] xfs: v2 fix node forward in xfs_node_toosmall, Ben Myers |
| Previous by Thread: | [PATCH] xfsprogs: fix potential memory leak in verify_set_primary_sb(), Li Zhong |
| Next by Thread: | [PATCH v2] xfsprogs: fix potential memory leak in verify_set_primary_sb(), Li Zhong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |