redundant call to free() since name is always freed upon return.
From Michael W. Bombardieri, with some tweaks by myself.
-/* $OpenBSD: func.c,v 1.36 2017/12/16 10:27:21 anton Exp $ */
+/* $OpenBSD: func.c,v 1.37 2017/12/18 19:12:24 anton Exp $ */
/* $NetBSD: func.c,v 1.11 1996/02/09 02:28:29 christos Exp $ */
/*-
/*ARGSUSED*/
dounsetenv(Char **v, struct command *t)
{
- Char **ep, *p, *n;
+ Char **ep, *p, *n, *name;
int i, maxi;
- static Char *name = NULL;
- free(name);
/*
* Find the longest environment variable
*/
break;
}
free(name);
- name = NULL;
}
void