[CRIU] [PATCH 1/5] seccomp: Fix typo in collect_filters

Cyrill Gorcunov gorcunov at gmail.com
Wed May 16 11:36:33 MSK 2018


*** CID 190178:  Null pointer dereferences  (NULL_RETURNS)
/criu/seccomp.c: 296 in collect_filters()

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 criu/seccomp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/seccomp.c b/criu/seccomp.c
index 4a6515c42ec5..f6362635e330 100644
--- a/criu/seccomp.c
+++ b/criu/seccomp.c
@@ -287,7 +287,7 @@ static int collect_filters(struct pstree_item *item)
 
 	for (i = 0; i < item->nr_threads; i++) {
 		entry = seccomp_find_entry(item->threads[i]->real);
-		if (!leader) {
+		if (!entry) {
 			pr_err("Can't collect filter on tid_real %d\n",
 			       item->pid->real);
 			return -1;
-- 
2.14.3



More information about the CRIU mailing list