shithub: npe

Download patch

ref: 090b7a5e6744afa35aa1a8ca66071748c228a776
parent: c892d8d9aeb18a0872652cde8dd301821dd0c397
author: qwx <qwx@sciops.net>
date: Mon Mar 2 19:03:09 EST 2026

sdl2: fix double-free after npe_getenv call in SDL_GetPrefPath

--- a/libnpe_sdl2/sdl2.c
+++ b/libnpe_sdl2/sdl2.c
@@ -1578,7 +1578,6 @@
 	if((home = getenv("home")) != nil){
 		if((p = smprint("%s/lib/%s/%s", home, org, app)) != nil)
 			npe_mkdirp(cleanname(p), 0755);
-		free(home);
 	}
 
 	return p;
--