Can we please get rid of these *gotos*? If you call `yajl_gen_free()` in the calling function (which passes in `g`) and we don't generate a message here, this would become simply `return;`. Alternatively, we could `return -1;` in the error case and print an error in the calling function. Last (and most noisy) option: Emit an appropriate error message in each error handling block. That last is what I usually do, but I'm unsure how reasonable that is in a log plugin …