di->soname was not freed, so was leaked when debug info is removed.
free(soname) added in free_Debuginfo, after having verified
and then ensured that all soname are allocated in dinfo.
regtested on deb6/amd64
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12442
vg_assert(di != NULL);
if (di->fsm.filename) ML_(dinfo_free)(di->fsm.filename);
+ if (di->soname) ML_(dinfo_free)(di->soname);
if (di->loctab) ML_(dinfo_free)(di->loctab);
if (di->cfsi) ML_(dinfo_free)(di->cfsi);
if (di->cfsi_exprs) VG_(deleteXA)(di->cfsi_exprs);
we have committed to reading the symbols and debug info (that
is, at the point where .have_dinfo is set to True). */
- /* The file's soname. FIXME: ensure this is always allocated in
- VG_AR_DINFO. */
+ /* The file's soname. */
UChar* soname;
/* Description of some important mapped segments. The presence or
find a soname, add a fake one. */
if (di->soname == NULL) {
TRACE_SYMTAB("No soname found; using (fake) \"NONE\"\n");
- di->soname = "NONE";
+ di->soname = ML_(dinfo_strdup)("di.redi.2", "NONE");
}
vg_assert(n_rx >= 0 && n_rx <= N_RX_RW_AREAS);