[rtems-libbsd commit] mDNSResponder: Fix gAllocatedEventFDs allocation
Sebastian Huber
sebh at rtems.org
Thu Sep 20 08:25:09 UTC 2018
Module: rtems-libbsd
Branch: master
Commit: ed40c80fc1e18be026291f15d08bebe77e2a27f0
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=ed40c80fc1e18be026291f15d08bebe77e2a27f0
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Sep 20 10:22:53 2018 +0200
mDNSResponder: Fix gAllocatedEventFDs allocation
---
mDNSResponder/mDNSPosix/mDNSPosix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mDNSResponder/mDNSPosix/mDNSPosix.c b/mDNSResponder/mDNSPosix/mDNSPosix.c
index d8058f6..6bc22af 100755
--- a/mDNSResponder/mDNSPosix/mDNSPosix.c
+++ b/mDNSResponder/mDNSPosix/mDNSPosix.c
@@ -1260,7 +1260,7 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
mDNS_SetFQDN(m);
#ifdef __rtems__
if (err == mStatus_NoError) {
- gAllocatedEventFDs = calloc(1, howmany(rtems_libio_number_iops, sizeof(fd_set) * 8));
+ gAllocatedEventFDs = calloc(howmany(rtems_libio_number_iops, sizeof(fd_set) * 8), sizeof(fd_set));
if (gAllocatedEventFDs == NULL) err = mStatus_NoMemoryErr;
}
if (err == mStatus_NoError) err = pthread_mutexattr_init(&attr);
More information about the vc
mailing list