From 47ba8235cd380c5b0d042335fd609c1d72d06377 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Mon, 19 Oct 2009 02:39:02 +0000
Subject: hotplug2: fix "MALLOC FAILURE!" message caused by a missing return
 code check on recv()

SVN-Revision: 18061
---
 package/hotplug2/patches/100-recv_check.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 package/hotplug2/patches/100-recv_check.patch

(limited to 'package/hotplug2/patches')

diff --git a/package/hotplug2/patches/100-recv_check.patch b/package/hotplug2/patches/100-recv_check.patch
new file mode 100644
index 0000000000..168df47bb0
--- /dev/null
+++ b/package/hotplug2/patches/100-recv_check.patch
@@ -0,0 +1,12 @@
+--- a/hotplug2.c
++++ b/hotplug2.c
+@@ -300,6 +300,9 @@ int main(int argc, char *argv[]) {
+ 	worker_ctx = settings->worker->module->init(settings);
+ 	while (process) {
+ 		size = recv(settings->netlink_socket, &buffer, sizeof(buffer), 0);
++		if (size < 0)
++			continue;
++
+ 		uevent = uevent_deserialize(buffer, size);
+ 		
+ 		if (uevent == NULL)
-- 
cgit v1.2.3