diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index bd5faa2c0..35fd1e79f 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -916,7 +916,7 @@ static struct payment_result *tal_sendpay_result_from_json(const tal_t *ctx, /* Initial sanity checks, all these fields must exist. */ if (idtok == NULL || idtok->type != JSMN_PRIMITIVE || hashtok == NULL || hashtok->type != JSMN_STRING || - senttok == NULL || senttok->type != JSMN_STRING || + senttok == NULL || statustok == NULL || statustok->type != JSMN_STRING) { return NULL; } diff --git a/plugins/libplugin.c b/plugins/libplugin.c index 2e728f159..86eeb60d8 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -1591,8 +1591,8 @@ static struct listpeers_channel *json_to_listpeers_channel(const tal_t *ctx, ftxidtok == NULL || ftxidtok->type != JSMN_STRING || (scidtok != NULL && scidtok->type != JSMN_STRING) || (dirtok != NULL && dirtok->type != JSMN_PRIMITIVE) || - tmsattok == NULL || tmsattok->type != JSMN_STRING || - smsattok == NULL || smsattok->type != JSMN_STRING) + tmsattok == NULL || + smsattok == NULL) return NULL; chan = tal(ctx, struct listpeers_channel);