Add central Lua shutdown function and use it
- makes sure lua garbage collect runs - memory used by lua gets freed
This commit is contained in:
parent
6be1bdf125
commit
267e77f1c1
|
@ -35,4 +35,10 @@ void rpmLuaInit(void)
|
|||
return;
|
||||
}
|
||||
|
||||
void rpmLuaFree(void)
|
||||
{
|
||||
rpmlua lua = rpmluaGetGlobalState();
|
||||
rpmluaFree(lua);
|
||||
}
|
||||
|
||||
#endif /* WITH_LUA */
|
||||
|
|
|
@ -4,4 +4,7 @@
|
|||
/* Initialize Lua subsystem & register all our extensions */
|
||||
void rpmLuaInit(void);
|
||||
|
||||
/* Shutdown Lua subsystem */
|
||||
void rpmLuaFree(void);
|
||||
|
||||
#endif /* _RPMLIBLUA_H */
|
||||
|
|
|
@ -1606,6 +1606,9 @@ void rpmFreeRpmrc(void)
|
|||
|
||||
/* XXX doesn't really belong here but... */
|
||||
rpmFreeCrypto();
|
||||
#ifdef WITH_LUA
|
||||
rpmLuaFree();
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue