summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-04-25 04:09:45 +0000
committerRoland McGrath <roland@gnu.org>1996-04-25 04:09:45 +0000
commit146a9ab807de64461e87fd48d2eb089efc8c2123 (patch)
treef2ed179b15874e1f0428913deeff2972638c7d63 /libshouldbeinlibc
parent09afd0f282d390204a231b79ff3b26d36a03b126 (diff)
(idvec_free_contents): New function.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/idvec.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libshouldbeinlibc/idvec.c b/libshouldbeinlibc/idvec.c
index 49b05ca6..6daa639a 100644
--- a/libshouldbeinlibc/idvec.c
+++ b/libshouldbeinlibc/idvec.c
@@ -44,12 +44,18 @@ idvec_free_wrapper (struct idvec *idvec)
free (idvec);
}
-void
-idvec_free (struct idvec *idvec)
+void
+idvec_free_contents (struct idvec *idvec)
{
if (idvec->alloced)
free (idvec->ids);
- free (idvec);
+}
+
+void
+idvec_free (struct idvec *idvec)
+{
+ idvec_free_contents (idvec);
+ idvec_free_wrapper (idvec);
}
/* Ensure that IDVEC has enough spaced allocated to hold NUM ids, thus