Commit Diff


commit - c0130f838ee9ccc1da39369dce8119349000c571
commit + c1f7b2cc26e859c6e29009c1ade477891952159d
blob - d32a5e5378493e90fca5b687d431d54b0195ba3c
blob + 77ab1ffd38f09648f9253776239d63d37f6d052b
--- commands.c
+++ commands.c
@@ -3848,6 +3848,8 @@ pr_environment(int argc, char **argv, ...)
 
 		for (ep = sorted_environ; *ep; ep++)
 			dprintf(fd, "%s\n", *ep);
+
+		free(sorted_environ);
 	}
 
 	fsync(fd);