Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0461-erlc-Fix-codechecker-memory-leak-warning.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0461-erlc-Fix-codechecker-memory-leak-warning.patch of Package erlang
From 5da9b619b8193b98bb6ff720691595e033c450b9 Mon Sep 17 00:00:00 2001 From: Kjell Winblad <kjellwinblad@gmail.com> Date: Wed, 17 Mar 2021 09:10:36 +0100 Subject: [PATCH 01/10] erlc: Fix codechecker memory leak warning --- erts/etc/common/erlc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c index 523ead86ed..6b00a1f48f 100644 --- a/erts/etc/common/erlc.c +++ b/erts/etc/common/erlc.c @@ -892,6 +892,8 @@ find_executable(char* progname) struct stat s; if (stat(real_name, &s) == 0 && s.st_mode & S_IFREG) { return real_name; + } else { + free(real_name); } } } while (*path++ == ':'); @@ -908,7 +910,11 @@ safe_realpath(char* file) * Solaris. */ char* real_name = emalloc(PATH_MAX + 1); - return realpath(file, real_name); + char* result = realpath(file, real_name); + if (result != real_name) { + free(real_name); + } + return result; } #endif -- 2.26.2
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