util.c: Decreasing reference count on allocated JSON obects to prevent memory leak