tb Fix runtime being initialized on every interp_runstring() exec, which causes memory leaks
This commit is contained in:
@ -189,7 +189,6 @@ bool interp_runstring(char *string, InterpResult **res, bool interactive) {
|
||||
*res = &RES;
|
||||
string_memset(RES.errmsg, 0, sizeof(RES.errmsg));
|
||||
|
||||
rt_init();
|
||||
bool ok = true;
|
||||
|
||||
char *line = string_tokenizealloc_linecontinue(string, "\n");
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include "interp.h"
|
||||
#include "macros.h"
|
||||
#include "config.h"
|
||||
#include "runtime.h"
|
||||
|
||||
#define LINEBUF_MAX 1024
|
||||
|
||||
@ -147,6 +148,7 @@ void main(void) {
|
||||
}
|
||||
|
||||
set_config();
|
||||
rt_init();
|
||||
|
||||
do_file("base:/scripts/rc.tb");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user