summaryrefslogtreecommitdiff
path: root/lib/execute.c
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2004-04-07 18:46:47 +0000
committerStef Walter <stef@thewalter.net>2004-04-07 18:46:47 +0000
commit08c1eaa8aa0e6928bb5067df417ac785c1bce326 (patch)
treec2bbc32747b2e5f68228a28aa333746259b77471 /lib/execute.c
parent05e57ad8486240d321fb79f474e2dcb9a34579f4 (diff)
Memory allocation fixes.
Diffstat (limited to 'lib/execute.c')
-rw-r--r--lib/execute.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/execute.c b/lib/execute.c
index 3bf3c4b..195d783 100644
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -343,7 +343,13 @@ struct vari* _variablesNew(variables* vars, const char* name,
/* Oops! */
if(!v->name || !v->value)
+ {
+ if(v->name)
+ free(v->name);
+ if(v->value)
+ free(v->value);
return NULL;
+ }
vars->cur++;