diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch')
-rw-r--r-- | meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch index d64fb35db..d9adde04c 100644 --- a/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch +++ b/meta-openembedded/meta-networking/recipes-protocols/mdns/files/0011-Change-a-dynamic-allocation-to-file-scope-variable.patch @@ -1,7 +1,7 @@ -From 19de26db69408f02241e232b39224589a0f630df Mon Sep 17 00:00:00 2001 +From 9ff06108cd44e84ba6c68bfa6737e793f117e303 Mon Sep 17 00:00:00 2001 From: Nate Karstens <nate.karstens@garmin.com> Date: Thu, 10 Aug 2017 08:46:03 -0500 -Subject: [PATCH 11/11] Change a dynamic allocation to file-scope variable +Subject: [PATCH] Change a dynamic allocation to file-scope variable Changes a variable from being dynamically-allocated to being statically-allocated at the file scope. Addresses a Coverity @@ -11,14 +11,14 @@ Upstream-Status: Submitted [dts@apple.com] Signed-off-by: Nate Karstens <nate.karstens@garmin.com> --- - mDNSPosix/mDNSPosix.c | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) + mDNSPosix/mDNSPosix.c | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index 84af26b..b7795ed 100644 +index 7aeee7b..2d25016 100755 --- a/mDNSPosix/mDNSPosix.c +++ b/mDNSPosix/mDNSPosix.c -@@ -91,6 +91,7 @@ static sigset_t gEventSignalSet; // Signals which event loop list +@@ -81,6 +81,7 @@ static sigset_t gEventSignalSet; // Signals which event loop list static sigset_t gEventSignals; // Signals which were received while inside loop static PosixNetworkInterface *gRecentInterfaces; @@ -26,13 +26,13 @@ index 84af26b..b7795ed 100644 // *************************************************************************** // Globals (for debugging) -@@ -1412,16 +1413,11 @@ cleanup: +@@ -1641,18 +1642,11 @@ mDNSlocal void InterfaceChangeCallback(int fd, void *context) mDNSlocal mStatus WatchForInterfaceChange(mDNS *const m) { mStatus err; - IfChangeRec *pChgRec; -- pChgRec = (IfChangeRec*) mDNSPlatformMemAllocate(sizeof *pChgRec); +- pChgRec = (IfChangeRec*) mDNSPlatformMemAllocateClear(sizeof *pChgRec); - if (pChgRec == NULL) - return mStatus_NoMemoryErr; - @@ -42,10 +42,12 @@ index 84af26b..b7795ed 100644 + err = OpenIfNotifySocket(&gChgRec.NotifySD); if (err == 0) - err = mDNSPosixAddFDToEventLoop(pChgRec->NotifySD, InterfaceChangeCallback, pChgRec); +- if (err) +- mDNSPlatformMemFree(pChgRec); + err = mDNSPosixAddFDToEventLoop(gChgRec.NotifySD, InterfaceChangeCallback, &gChgRec); return err; } -- -2.17.1 +2.20.1 |