mirror of
https://github.com/samba-team/samba.git
synced 2025-11-16 20:23:50 +03:00
r8273: fixed some memory leaks in smbscript. This required converting
file_load() to use talloc, which impacted quite a few bits of code, including our smb.conf processing. took the opportunity to remove the gloabls in params.c while doing this
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
8f69867867
commit
b220756cb4
@@ -94,12 +94,13 @@ void ejs_exception(const char *reason)
|
||||
for (i=1;argv[i];i++) {
|
||||
argv_list = str_list_add(argv_list, argv[i]);
|
||||
}
|
||||
talloc_steal(mem_ctx, argv_list);
|
||||
v = mprList("ARGV", argv_list);
|
||||
mprSetPropertyValue(&v, "length", mprCreateIntegerVar(i-1));
|
||||
mprCreateProperty(ejsGetGlobalObject(eid), "ARGV", &v);
|
||||
|
||||
/* load the script and advance past interpreter line*/
|
||||
script = file_load(fname, &script_size);
|
||||
script = file_load(fname, &script_size, mem_ctx);
|
||||
|
||||
if ((script_size > 2) && script[0] == '#' && script[1] == '!') {
|
||||
script += 2;
|
||||
|
||||
Reference in New Issue
Block a user