mirror of
https://github.com/samba-team/samba.git
synced 2025-11-22 16:23:49 +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 used to be commit b220756cb4)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
c6881d1e65
commit
76ecf81428
@@ -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