mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
lightningd: don't call memcpy with NULL.
Thanks C committee! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
5dfcd15782
commit
6044184323
@ -546,7 +546,8 @@ static struct plugin **plugin_hook_make_ordered(const tal_t *ctx,
|
||||
}
|
||||
|
||||
/* Success! Copy ordered hooks back. */
|
||||
memcpy(hook->hooks, done, tal_bytelen(hook->hooks));
|
||||
if (hook->hooks)
|
||||
memcpy(hook->hooks, done, tal_bytelen(hook->hooks));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user