worker: plug leak in event tracing
@@ -796,9 +796,17 @@ _worker_poke_work(c3_d evt_d, // event number
u3_noun wir = u3h(u3t(job));
u3_noun cad = u3h(u3t(u3t(job)));
+ // XX these allocations should only be performed if tracing is enabled
+ //
c3_c lab_c[2048];
- snprintf(lab_c, 2048, "event %" PRIu64 ": [%s %s]", evt_d,
- u3m_pretty_path(wir), u3m_pretty(cad));
+ {
+ c3_c* cad_c = u3m_pretty(cad);
+ c3_c* wir_c = u3m_pretty_path(wir);
+ snprintf(lab_c, 2048, "event %" PRIu64 ": [%s %s]",
+ evt_d, wir_c, cad_c);
+ c3_free(cad_c);
+ c3_free(wir_c);
+ }
u3t_event_trace(lab_c, 'B');
_worker_work_live(evt_d, job);
