fix mutex not being unlocked if malloc fails

This commit is contained in:
marcoe 2023-07-04 02:20:20 +02:00
parent 14a02d4002
commit d9600b1cd7

View file

@ -449,6 +449,7 @@ zathura_render_request(ZathuraRenderRequest* request, gint64 last_view_time)
render_job_t* job = g_try_malloc0(sizeof(render_job_t)); render_job_t* job = g_try_malloc0(sizeof(render_job_t));
if (job == NULL) { if (job == NULL) {
g_mutex_unlock(&request_priv->jobs_mutex);
return; return;
} }