app_queue.c: Fix json ref leak