]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r269750:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 12 Aug 2014 17:56:48 +0000 (17:56 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 12 Aug 2014 17:56:48 +0000 (17:56 +0000)
commitd5b60b22a814d133b8f04376c6710d0b58064491
tree8409f656a637d571aaf62ba35fdbb200bd73b617
parentdb1eb5fd27fb7bf5ecda74378353e1b05b80ee85
MFC r269750:

In r268463, I misplaced a return in demangle(), causing the function to
erroneously skip symbols that were not mangled at all.  Fix this by
moving the return into the preceding if block.

While here, simplify the code by letting __cxa_demangle() allocate the
needed space for the demangled symbol.  This also fixes a memory leak,
which would occur whenever __cxa_demangle() failed.

Reported by: pgj
PR: base/191981

git-svn-id: svn://svn.freebsd.org/base/stable/10@269885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libproc/proc_sym.c