summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Kerola2014-07-13 19:23:44 +0200
committerSami Kerola2014-07-13 19:35:39 +0200
commitb697fc994aac21ba0ccc8658fc6a3f9fdfdd096b (patch)
tree86e856e0a214067d1c57b017cd3c4f98b56e7280
parentlibfdisk: do not do the same thing twice in single if statement (diff)
downloadkernel-qcow2-util-linux-b697fc994aac21ba0ccc8658fc6a3f9fdfdd096b.tar.gz
kernel-qcow2-util-linux-b697fc994aac21ba0ccc8658fc6a3f9fdfdd096b.tar.xz
kernel-qcow2-util-linux-b697fc994aac21ba0ccc8658fc6a3f9fdfdd096b.zip
libsmartcols: avoid variable dereference after release
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r--libsmartcols/src/line.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsmartcols/src/line.c b/libsmartcols/src/line.c
index ab2f191b3..6e83fb47f 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;
}