Skip to content

Commit

Permalink
lxccontainer: don't pass NULL pointer
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Oct 14, 2021
1 parent 74e9fc1 commit 9843495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/lxccontainer.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 9843495

Please sign in to comment.