1
0
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:
Andrew Tridgell
2005-07-10 01:10:09 +00:00
committed by Gerald (Jerry) Carter
parent c6881d1e65
commit 76ecf81428
10 changed files with 90 additions and 121 deletions

View File

@@ -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;