diff options
author | Kevin Buettner <kevinb@redhat.com> | 2000-12-15 01:01:51 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2000-12-15 01:01:51 +0000 |
commit | 7fd5097f9fb26871e9f0b329f1cf5554495ed589 (patch) | |
tree | 20b4de6e7953169d2402aff4e158b475b5726e67 /gdb/environ.c | |
parent | eac388f33554805a5765a2836926311f77cd8d79 (diff) | |
download | gdb-7fd5097f9fb26871e9f0b329f1cf5554495ed589.tar.gz |
Replace free() with xfree().
Diffstat (limited to 'gdb/environ.c')
-rw-r--r-- | gdb/environ.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/environ.c b/gdb/environ.c index 53e63e099dc..4ce00807560 100644 --- a/gdb/environ.c +++ b/gdb/environ.c @@ -48,9 +48,9 @@ free_environ (register struct environ *e) register char **vector = e->vector; while (*vector) - free (*vector++); + xfree (*vector++); - free (e); + xfree (e); } /* Copy the environment given to this process into E. @@ -137,7 +137,7 @@ set_in_environ (struct environ *e, const char *var, const char *value) vector[i + 1] = 0; } else - free (s); + xfree (s); s = (char *) xmalloc (len + strlen (value) + 2); strcpy (s, var); @@ -171,7 +171,7 @@ unset_in_environ (struct environ *e, char *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. */ |