Diff between 19ff9ab9151205501025a8bd061da022bb44bd58 and 537e399aa0960d57de5ba958ed4ddde713cd7ae2

Changed Files

File Additions Deletions Status
android/avdtp.c +3 -1 modified

Full Patch

diff --git a/android/avdtp.c b/android/avdtp.c
index a261a8e..e046685 100644
--- a/android/avdtp.c
+++ b/android/avdtp.c
@@ -2130,8 +2130,10 @@ struct avdtp *avdtp_new(int fd, size_t imtu, size_t omtu, uint16_t version,
 		return NULL;
 	}
 
-	if (set_priority(new_fd, 6) < 0)
+	if (set_priority(new_fd, 6) < 0) {
+		close(new_fd);
 		return NULL;
+	}
 
 	session = g_new0(struct avdtp, 1);
 	session->io = g_io_channel_unix_new(new_fd);