aboutsummaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
Diffstat (limited to 'nis')
-rw-r--r--nis/nis_subr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nis/nis_subr.c b/nis/nis_subr.c
index dd0e300..6784fc3 100644
--- a/nis/nis_subr.c
+++ b/nis/nis_subr.c
@@ -103,9 +103,6 @@ count_dots (const_nis_name str)
return count;
}
-/* If we run out of memory, we don't give already allocated memory
- free. The overhead for bringing getnames back in a safe state to
- free it is to big. */
nis_name *
nis_getnames (const_nis_name name)
{
@@ -271,7 +268,10 @@ nis_getnames (const_nis_name name)
nis_name *newp = realloc (getnames,
(count + 1) * sizeof (char *));
if (__glibc_unlikely (newp == NULL))
- goto free_null;
+ {
+ free (tmp);
+ goto free_null;
+ }
getnames = newp;
}
getnames[pos] = tmp;