summaryrefslogtreecommitdiff
path: root/freebsd/lib/libc/rpc/getrpcent.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/lib/libc/rpc/getrpcent.c')
-rw-r--r--freebsd/lib/libc/rpc/getrpcent.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/freebsd/lib/libc/rpc/getrpcent.c b/freebsd/lib/libc/rpc/getrpcent.c
index b4d51e0d..bed8074c 100644
--- a/freebsd/lib/libc/rpc/getrpcent.c
+++ b/freebsd/lib/libc/rpc/getrpcent.c
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
*/
#include <rtems/bsd/sys/param.h>
-#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <assert.h>
@@ -514,6 +513,7 @@ nis_rpcent(void *retval, void *mdata, va_list ap)
sizeof(char *)) {
*errnop = ERANGE;
rv = NS_RETURN;
+ free(resultbuf);
break;
}
@@ -523,6 +523,7 @@ nis_rpcent(void *retval, void *mdata, va_list ap)
if (aliases_size < 1) {
*errnop = ERANGE;
rv = NS_RETURN;
+ free(resultbuf);
break;
}
@@ -971,7 +972,7 @@ getrpc(int (*fn)(union key, struct rpcent *, char *, size_t, struct rpcent **),
}
struct rpcent *
-getrpcbyname(char *name)
+getrpcbyname(const char *name)
{
union key key;
@@ -991,7 +992,7 @@ getrpcbynumber(int number)
}
struct rpcent *
-getrpcent()
+getrpcent(void)
{
union key key;
@@ -1025,7 +1026,7 @@ setrpcent(int stayopen)
}
void
-endrpcent()
+endrpcent(void)
{
#ifdef NS_CACHING
static const nss_cache_info cache_info = NS_MP_CACHE_INFO_INITIALIZER(