summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidn <davidn@FreeBSD.org>1997-01-30 03:37:13 +0000
committerdavidn <davidn@FreeBSD.org>1997-01-30 03:37:13 +0000
commit25969ba11923c9f40bc5245574864f786bfeea2b (patch)
treec7a48aa37a35536c8ac5726ff3ba674d085e2da2
parentc2172b20d217b3568a8a91da3035439fe161d385 (diff)
downloadFreeBSD-src-25969ba11923c9f40bc5245574864f786bfeea2b.zip
FreeBSD-src-25969ba11923c9f40bc5245574864f786bfeea2b.tar.gz
Fix free()ing block twice, remove unused function.
-rw-r--r--lib/libutil/login_cap.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c
index 99e53c6..71e3f8a 100644
--- a/lib/libutil/login_cap.c
+++ b/lib/libutil/login_cap.c
@@ -121,20 +121,6 @@ arrayize(char *str, const char *chars, int *size)
return res;
}
-static void
-freearraystr(char ** array)
-{
- /*
- * the array[0] should be free'd, and then array.
- */
- if (array) {
- free(array[0]);
- array[0] = NULL;
- free(array);
- }
-}
-
-
/*
* login_close()
* Frees up all resources relating to a login class
@@ -150,7 +136,7 @@ login_close(login_cap_t * lc)
free(lc);
if (--lc_object_count == 0) {
free(internal_string);
- freearraystr(internal_array);
+ free(internal_array);
internal_array = NULL;
internal_arraysz = 0;
internal_string = NULL;
OpenPOWER on IntegriCloud