* [Buildroot] [Bug 10201] New: buildroot-2017.08-rc1/toolchain/toolchain-wrapper.c:192]: (error) Memory leak:
@ 2017-08-09 20:18 bugzilla at busybox.net
2017-08-11 14:15 ` [Buildroot] [Bug 10201] " bugzilla at busybox.net
0 siblings, 1 reply; 2+ messages in thread
From: bugzilla at busybox.net @ 2017-08-09 20:18 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=10201
Bug ID: 10201
Summary: buildroot-2017.08-rc1/toolchain/toolchain-wrapper.c:19
2]: (error) Memory leak:
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: dcb314 at hotmail.com
CC: buildroot at uclibc.org
Target Milestone: ---
Source code is
basename = progpath;
absbasedir = malloc(PATH_MAX + 1);
ret = readlink("/proc/self/exe", absbasedir, PATH_MAX);
if (ret < 0) {
perror(__FILE__ ": readlink");
return 2;
}
Probably not worth much, but a call to free would shut up
the static analyser.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread* [Buildroot] [Bug 10201] buildroot-2017.08-rc1/toolchain/toolchain-wrapper.c:192]: (error) Memory leak:
2017-08-09 20:18 [Buildroot] [Bug 10201] New: buildroot-2017.08-rc1/toolchain/toolchain-wrapper.c:192]: (error) Memory leak: bugzilla at busybox.net
@ 2017-08-11 14:15 ` bugzilla at busybox.net
0 siblings, 0 replies; 2+ messages in thread
From: bugzilla at busybox.net @ 2017-08-11 14:15 UTC (permalink / raw)
To: buildroot
https://bugs.busybox.net/show_bug.cgi?id=10201
Arnout Vandecappelle <arnout@mind.be> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
--- Comment #1 from Arnout Vandecappelle <arnout@mind.be> ---
Your static analyser is weird, because there are a few other things which
aren't freed either: relbasedir, absbasedir in different code paths.
However, we do this by choice. Freeing things before exiting is useless, since
the OS will implicitly free everything when the program exits. That's why e.g.
valgrind doesn't report these as real memory leaks (because they are still
reachable).
So no, this is not a memory leak.
For consistency, the free(args) at the end should be removed, but that's a
different issue.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-11 14:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-09 20:18 [Buildroot] [Bug 10201] New: buildroot-2017.08-rc1/toolchain/toolchain-wrapper.c:192]: (error) Memory leak: bugzilla at busybox.net
2017-08-11 14:15 ` [Buildroot] [Bug 10201] " bugzilla at busybox.net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox