hotplug2: fix "MALLOC FAILURE!" message caused by a missing return code check on...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 19 Oct 2009 02:39:02 +0000 (02:39 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 19 Oct 2009 02:39:02 +0000 (02:39 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18061 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/hotplug2/patches/100-recv_check.patch [new file with mode: 0644]

diff --git a/package/hotplug2/patches/100-recv_check.patch b/package/hotplug2/patches/100-recv_check.patch
new file mode 100644 (file)
index 0000000..168df47
--- /dev/null
@@ -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)