mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-21 03:52:16 -08:00
* Fix memory leak when native compiled function is collected
* src/alloc.c (cleanup_vector): Handle native compiled functions.
This commit is contained in:
parent
904550d8c8
commit
ab78ed83b9
1 changed files with 11 additions and 0 deletions
11
src/alloc.c
11
src/alloc.c
|
|
@ -3156,6 +3156,17 @@ cleanup_vector (struct Lisp_Vector *vector)
|
|||
PSEUDOVEC_STRUCT (vector, Lisp_Native_Comp_Unit);
|
||||
dispose_comp_unit (cu, true);
|
||||
}
|
||||
else if (NATIVE_COMP_FLAG
|
||||
&& PSEUDOVECTOR_TYPEP (&vector->header, PVEC_SUBR))
|
||||
{
|
||||
struct Lisp_Subr *subr =
|
||||
PSEUDOVEC_STRUCT (vector, Lisp_Subr);
|
||||
if (subr->native_comp_u[0])
|
||||
{
|
||||
xfree (subr->symbol_name);
|
||||
xfree (subr->native_c_name[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Reclaim space used by unmarked vectors. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue