r19048: ensure our memory gets cleaned up even upon exception
authorDerrell Lipman <derrell@samba.org>
Mon, 2 Oct 2006 15:23:03 +0000 (15:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:20:31 +0000 (14:20 -0500)
source/scripting/ejs/literal.c

index f7168e2c4edb90fbf952c4290f36cb6058115c94..4eeb35c42367e51c1569aa7164554af202fa7747 100644 (file)
@@ -92,7 +92,7 @@ int literal_to_var(int eid, int argc, char **argv)
 
         tok.source = argv[0];
         tok.pos = 0;
-        tok.ctx = talloc_new(NULL);
+        tok.ctx = talloc_new(mprMemCtx());
         if (tok.ctx == NULL) {
                 mpr_Return(eid, mprCreateUndefinedVar());
                 return 0;