Diff between 014471cae859a34591dd1f768712aaf14788ebd2 and 69a8e1c3fb14f14699798665f38fbf6d517f2cf7

Changed Files

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

Full Patch

diff --git a/android/hal-audio.c b/android/hal-audio.c
index a6347af..a2601fd 100644
--- a/android/hal-audio.c
+++ b/android/hal-audio.c
@@ -1179,8 +1179,10 @@ static int audio_open_output_stream(struct audio_hw_device *dev,
 	if (!preset || fd < 0)
 		goto fail;
 
-	if (set_blocking(fd) < 0)
+	if (set_blocking(fd) < 0) {
+		free(preset);
 		goto fail;
+	}
 
 	out->ep->fd = fd;
 	codec = out->ep->codec;