Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
File not found: mpd-fmt11.patch
home:Ledest:erlang:24
erlang
1126-erts-fix-memoryleak-in-erlc.c.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1126-erts-fix-memoryleak-in-erlc.c.patch of Package erlang
From e65eed241965e5d8a147760635e23fe590cad631 Mon Sep 17 00:00:00 2001 From: frazze-jobb <frazze@erlang.org> Date: Wed, 23 Oct 2024 10:25:25 +0200 Subject: [PATCH 2/2] erts: fix memoryleak in erlc.c --- erts/etc/common/erlc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c index c6cf0de491..d376cd8975 100644 --- a/erts/etc/common/erlc.c +++ b/erts/etc/common/erlc.c @@ -258,6 +258,9 @@ int main(int argc, char** argv) { char* full_path_emulator = find_executable(emulator); set_env("ERLC_CONFIGURATION", full_path_emulator); + if (full_path_emulator != emulator) { + free(full_path_emulator); + } } #endif @@ -276,6 +279,9 @@ int main(int argc, char** argv) eargv = eargv_base; eargc = 0; PUSH(strsave(emulator)); + if (emulator != env) { + free(emulator); + } eargc_base = eargc; eargv = eargv + eargv_size/2; eargc = 0; @@ -1053,7 +1059,7 @@ get_default_emulator(char* progname) char* s; if (strlen(progname) >= sizeof(sbuf)) - return ERL_NAME; + return strsave(ERL_NAME); strcpy(sbuf, progname); for (s = sbuf+strlen(sbuf); s >= sbuf; s--) { @@ -1064,7 +1070,7 @@ get_default_emulator(char* progname) break; } } - return ERL_NAME; + return strsave(ERL_NAME); } -- 2.43.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor