mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user