res_ari_events: Fix use after free / double-free of JSON message.