diff options
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/var.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index f3215765446..559f82d5076 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: var.c,v 1.66 2007/07/20 12:32:45 espie Exp $ */ +/* $OpenBSD: var.c,v 1.67 2007/07/22 17:56:50 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* @@ -1094,13 +1094,15 @@ Var_NewLoopVar(const char *name, const char *ename) l->me = find_global_var_without_env(name, ename, k); l->old = *(l->me); - l->me->flags |= VAR_SEEN_ENV; + l->me->flags = VAR_SEEN_ENV | VAR_DUMMY; return l; } void Var_DeleteLoopVar(struct LoopVar *l) { + if ((l->me->flags & VAR_DUMMY) == 0) + Buf_Destroy(&(l->me->val)); *(l->me) = l->old; free(l); } |