diff packages/net/httpd/current/src/monitor.c @ 2271:fd2c3f3def9d

* src/monitor.c (cyg_monitor_network): Calling the network monitor html handler can trigger an exception when the function getifaddrs() fails because we are out of memory. Check the return code and return failure if this happens.
author asl
date Fri, 11 Aug 2006 15:54:45 +0000
parents eb9d23483db9
children 74dbf4c3f2e1
line wrap: on
line diff
--- a/packages/net/httpd/current/src/monitor.c
+++ b/packages/net/httpd/current/src/monitor.c
@@ -702,7 +702,8 @@ static cyg_bool cyg_monitor_network( FIL
 {
     struct ifaddrs *iflist, *ifp;
 
-    getifaddrs(&iflist);
+    if(getifaddrs(&iflist)!=0)
+        return 0;
     
     html_begin(client);