aboutsummaryrefslogtreecommitdiff
path: root/gdb/environ.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2000-12-15 01:01:51 +0000
committerKevin Buettner <kevinb@redhat.com>2000-12-15 01:01:51 +0000
commitb8c9b27d1e133d46199734ca1f047af8bb2d3314 (patch)
tree1aa002791f0e97bfc48c64222199e6d9f9e5eb53 /gdb/environ.c
parent6fa957a9b9408297206fb88e7c773931760f0528 (diff)
downloadgdb-b8c9b27d1e133d46199734ca1f047af8bb2d3314.zip
gdb-b8c9b27d1e133d46199734ca1f047af8bb2d3314.tar.gz
gdb-b8c9b27d1e133d46199734ca1f047af8bb2d3314.tar.bz2
Replace free() with xfree().
Diffstat (limited to 'gdb/environ.c')
-rw-r--r--gdb/environ.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/environ.c b/gdb/environ.c
index 53e63e0..4ce0080 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. */