jail: return to hook callback instead of just calling it
authorDaniel Golle <daniel@makrotopia.org>
Mon, 23 Aug 2021 16:41:57 +0000 (17:41 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 24 Aug 2021 17:31:31 +0000 (18:31 +0100)
Avoid stack pollution and potentially worse things.

Coverity CID: 1490056 Dereference after null check

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c

index d61bbe07138b91107e0ccd84a5a9a570b50d94ea..24a3df3a38643b6e90735a3c39ca32820f9d791d 100644 (file)
@@ -457,7 +457,7 @@ static void run_hooklist(void)
        struct stat s;
 
        if (!hook)
-               hook_return_cb();
+               return hook_return_cb();
 
        DEBUG("executing hook %s\n", hook->file);