diff --git a/binr/r2r/r2r.c b/binr/r2r/r2r.c index cd28b7b9e3..8f383751e0 100644 --- a/binr/r2r/r2r.c +++ b/binr/r2r/r2r.c @@ -464,6 +464,7 @@ int main(int argc, char **argv) { RThread *th = r_th_new (worker_th, &state, 0); if (!th) { eprintf ("Failed to start thread.\n"); + r_th_lock_leave (state.lock); exit (-1); } r_pvector_push (&workers, th);