| To: | Eric Sandeen <sandeen@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] xfs: avoid double-free in xfs_attr_node_addname |
| From: | Ben Myers <bpm@xxxxxxx> |
| Date: | Tue, 13 Aug 2013 16:34:12 -0500 |
| Cc: | "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx> |
| Delivered-to: | linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <51F9B77E.2030005@xxxxxxxxxx> |
| References: | <51F9B77E.2030005@xxxxxxxxxx> |
| User-agent: | Mutt/1.5.20 (2009-06-14) |
On Wed, Jul 31, 2013 at 08:18:54PM -0500, Eric Sandeen wrote: > xfs_attr_node_addname()'s error handling tests whether it > should free "state" in the out: error handling label: > > out: > if (state) > xfs_da_state_free(state); > > but an earlier free doesn't set state to NULL afterwards; this > could lead to a double free. Fix it by setting state to NULL > after it's freed. > > This was found by Coverity. > > Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> Applied. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: ***** SUSPECTED SPAM ***** [PATCH 00/50] xfs: patches for 3.12, Ben Myers |
|---|---|
| Next by Date: | Re: [PATCH] xfs: free bp in xlog_find_zeroed() error path, Ben Myers |
| Previous by Thread: | Re: [PATCH] xfs: avoid double-free in xfs_attr_node_addname, Mark Tinguely |
| Next by Thread: | Re: [PATCH] xfsprogs: fix buffer leak in xlog_print_find_oldest, Mark Tinguely |
| Indexes: | [Date] [Thread] [Top] [All Lists] |