aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-07 01:18:17 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-07 01:18:17 +1000
commit6291be256b520fe66408acc34579011d3f2dedbe (patch)
tree30608632a38b14f10f9a0cfbbd5e1ec709abab24 /exec.c
parente756f7d619a7458768d59cd9bd1c97c6a1c7788a (diff)
Second checkin of halloc changeover. Make the argv array, but not it's contents, be allocated using halloc. Also make list_to_char_arr use halloc
darcs-hash:20060206151817-ac50b-e8fd4cff831ee975c5bf3855d9ecfc15a3fb9215.gz
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/exec.c b/exec.c
index da3587a4..b7ef061e 100644
--- a/exec.c
+++ b/exec.c
@@ -37,6 +37,7 @@
#include "signal.h"
#include "env_universal.h"
#include "translate.h"
+#include "halloc.h"
/**
Prototype for the getpgid library function. The prototype for this
@@ -791,7 +792,7 @@ void exec( job_t *j )
int i;
string_buffer_t sb;
- const wchar_t * def = wcsdup(function_get_definition( p->argv[0] ));
+ wchar_t * def = halloc_wcsdup( j, function_get_definition( p->argv[0] ));
//fwprintf( stderr, L"run function %ls\n", argv[0] );
if( def == 0 )
{
@@ -834,8 +835,6 @@ void exec( job_t *j )
internal_exec_helper( def, TOP, j->io );
- free( def );
-
parser_allow_function();
parser_pop_block();