shithub: libmujs

Download patch

ref: bbb2c511e5c5e879d723c866737ea5e6181417ac
parent: 3f71a1c946093b8d2390cc2f738063cb75bb5a17
author: Sebastian Rasmussen <sebras@gmail.com>
date: Tue Oct 11 14:01:23 EDT 2022

Avoid freeing buffer twice in case of error.

--- a/pp.c
+++ b/pp.c
@@ -63,7 +63,6 @@
 
 	t = fread(s, 1, (size_t)n, f);
 	if (t != n) {
-		js_free(J, s);
 		js_error(J, "cannot read data from file: '%s'", filename);
 	}