=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/var.c,v retrieving revision 1.87 retrieving revision 1.88 diff -c -r1.87 -r1.88 *** src/usr.bin/make/var.c 2010/07/19 19:46:44 1.87 --- src/usr.bin/make/var.c 2011/06/20 19:05:33 1.88 *************** *** 1,4 **** ! /* $OpenBSD: var.c,v 1.87 2010/07/19 19:46:44 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: var.c,v 1.88 2011/06/20 19:05:33 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* *************** *** 790,799 **** has_modifier = parse_base_variable_name(&tstr, &name, ctxt); VarName_Free(&name); result = true; ! if (has_modifier) ! if (VarModifiers_Apply(NULL, NULL, ctxt, true, NULL, &tstr, ! str[1]) == var_Error) result = false; *pstr = tstr; return result; } --- 790,804 ---- has_modifier = parse_base_variable_name(&tstr, &name, ctxt); VarName_Free(&name); result = true; ! if (has_modifier) { ! bool freePtr = false; ! char *s = VarModifiers_Apply(NULL, NULL, ctxt, true, &freePtr, ! &tstr, str[1]); ! if (s == var_Error) result = false; + if (freePtr) + free(s); + } *pstr = tstr; return result; }