From 75910e0755b36aebc132555bd30acb54a827a902 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Mon, 30 Aug 2021 18:05:29 +0200 Subject: [PATCH] lxccontainer: don't pass NULL pointer Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 0218543b5..3b18d00ff 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -3401,12 +3401,12 @@ static int copyhooks(struct lxc_container *oldc, struct lxc_container *c) char *fname, *new_hook; char tmppath[PATH_MAX]; - fname = strrchr(hookname, '/'); + fname = strrchr(entry->val, '/'); if (!fname) return 0; /* If this hook is public - ignore. */ - if (!strnequal(hookname, cpath, len - 1)) + if (!strnequal(entry->val, cpath, len - 1)) continue; /* copy the script, and change the entry in confile */ -- 2.47.2