From 08c1eaa8aa0e6928bb5067df417ac785c1bce326 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 7 Apr 2004 18:46:47 +0000 Subject: Memory allocation fixes. --- lib/execute.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/execute.c') 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++; -- cgit v1.2.3