struct fastbuf rp_fb;
fbbuf_init_read(&rp_fb, rp_buf, rp_len, 0);
+ struct json_node *reply = NULL;
TRANS_TRY
{
- ctx->reply = json_parse(ctx->json, &rp_fb);
+ reply = json_parse(ctx->json, &rp_fb);
}
TRANS_CATCH(x)
{
}
TRANS_END;
- if (ctx->reply->type != JSON_OBJECT)
+ if (reply->type != JSON_OBJECT)
{
pam_syslog(ctx->pamh, LOG_ERR, "Malformed reply: Top-level node is not an object");
goto fail3;
}
+ ctx->reply = reply;
+
fail3:
free(rp_buf);
fail2: