Skip to content
Commit 510f1b3c authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by Emil Velikov
Browse files

st/va: release held locks in error paths



Found with the help of following Coccinelle semantic patch:
// <smpl>
@@
expression E;
@@

  \(pthread_mutex_lock\|mtx_lock\|simple_mtx_lock\)(E)
  ...
(
  \(pthread_mutex_unlock\|mtx_unlock\|simple_mtx_unlock\)(E);
  ...
  return ...;
|
+ maybe need_unlock(E);
  return ...;
)
// </smpl>

Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 0ad73031)
parent 694ed0d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment