diff mbox

[libdrm,3/3] freedreno: prevent deadlock in error path

Message ID 20170730202740.27564-3-eric@engestrom.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Engestrom July 30, 2017, 8:27 p.m. UTC
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
---
 freedreno/freedreno_bo.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index 10949ebf..7f8ea59c 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -138,6 +138,7 @@  fd_bo_from_dmabuf(struct fd_device *dev, int fd)
 	pthread_mutex_lock(&table_lock);
 	ret = drmPrimeFDToHandle(dev->fd, fd, &handle);
 	if (ret) {
+		pthread_mutex_unlock(&table_lock);
 		return NULL;
 	}