From b2f1fe598a37602244aad31ee3319c54fdc6ab78 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 20 Feb 2020 22:44:28 +0100 Subject: [PATCH] fixup! plugin: Fix hanging hook calls if the plugin dies --- lightningd/plugin_hook.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightningd/plugin_hook.c b/lightningd/plugin_hook.c index 585d405edf7b..2fbf139c18f3 100644 --- a/lightningd/plugin_hook.c +++ b/lightningd/plugin_hook.c @@ -180,6 +180,9 @@ static void plugin_hook_callback(const char *buffer, const jsmntok_t *toks, * to identify no-result responses. So make sure both are * set */ resulttok = NULL; + /* cppcheck isn't smart enough to notice that `resrestok` + * doesn't need to be initialized in the expression + * initializing `cont`, so set it to NULL to shut it up. */ resrestok = NULL; }