--- src/usr.bin/make/var.c 2005/02/28 12:00:10 1.109 +++ src/usr.bin/make/var.c 2005/02/28 12:17:37 1.110 @@ -215,6 +215,8 @@ VarCmp(const void *v, const void *name) static char * VarPossiblyExpand(const char *name, GNode *ctxt) { + Buffer *buf; + char *str; char *tmp; /* @@ -223,13 +225,11 @@ VarPossiblyExpand(const char *name, GNod */ tmp = estrdup(name); if (strchr(name, '$') != NULL) { - Buffer *buf; - char *str; - buf = Var_Subst(NULL, tmp, ctxt, 0); str = Buf_GetAll(buf, NULL); Buf_Destroy(buf, FALSE); + free(tmp); return (str); } else { return (tmp);