[PATCH 13/14] libsmartcols: avoid variable dereference after release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 libsmartcols/src/line.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libsmartcols/src/line.c b/libsmartcols/src/line.c
index ab2f191..6e83fb4 100644
--- a/libsmartcols/src/line.c
+++ b/libsmartcols/src/line.c
@@ -199,9 +199,9 @@ int scols_line_remove_child(struct libscols_line *ln, struct libscols_line *chil
 	DBG(LINE, ul_debugobj(ln, "remove child %p", child));
 
 	list_del_init(&child->ln_children);
+	child->parent = NULL;
 	scols_unref_line(child);
 
-	child->parent = NULL;
 	scols_unref_line(ln);
 	return 0;
 }
-- 
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux