shithub: blie

Download patch

ref: f7ce9af61db9b0d072dad403cb98d8bad4224dda
parent: da5ef81858616aa4cd9bd350b2de30a8553330a3
author: sirjofri <sirjofri@sirjofri.de>
date: Thu Aug 8 12:02:05 EDT 2024

closes file descriptors of resample

--- a/sample.c
+++ b/sample.c
@@ -100,9 +100,13 @@
 	
 	writeuncompressed(ro, src);
 	tm = readmemimage(re);
-	if (!tm)
+	if (!tm) {
+		close(re);
+		close(ro);
 		goto Err;
+	}
 	close(re);
+	close(ro);
 	return tm;
 Err:
 	fprint(2, "resample: %r\n");