/* environ.c -- library for manipulating environments for GNU.
- Copyright (C) 1986, 1989 Free Software Foundation, Inc.
+ Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 2000
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "defs.h"
#include "environ.h"
#include "gdb_string.h"
-#include "gdbcore.h"
\f
/* Return a new environment object. */
register char **vector = e->vector;
while (*vector)
- free (*vector++);
+ xfree (*vector++);
- free (e);
+ xfree (e);
}
/* Copy the environment given to this process into E.
vector[i + 1] = 0;
}
else
- free (s);
+ xfree (s);
s = (char *) xmalloc (len + strlen (value) + 2);
strcpy (s, var);
{
if (STREQN (s, var, len) && s[len] == '=')
{
- free (s);
+ xfree (s);
/* Walk through the vector, shuffling args down by one, including
the NULL terminator. Can't use memcpy() here since the regions
overlap, and memmove() might not be available. */