Ignore:
Timestamp:
Jun 10, 2009, 5:36:01 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Fix for interface list (by diver) in 3.3 branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/lib/replace/getifaddrs.c

    r221 r258  
    262262        struct ifaddrs *curif;
    263263        struct ifaddrs *lastif = NULL;
     264
     265
     266
    264267
    265268        *ifap = NULL;
     
    288291
    289292                if (ioctl(fd, SIOCGIFADDR, ifr) != 0) {
     293
    290294                        freeaddrinfo(*ifap);
    291295                        return -1;
     296
     297
     298
    292299                }
    293300
     
    307314
    308315                if (ioctl(fd, SIOCGIFFLAGS, ifr) != 0) {
     316
    309317                        freeaddrinfo(*ifap);
    310318                        return -1;
     319
     320
     321
    311322                }
    312323
     
    314325
    315326                if (ioctl(fd, SIOCGIFNETMASK, ifr) != 0) {
     327
    316328                        freeaddrinfo(*ifap);
    317329                        return -1;
     330
     331
     332
    318333                }
    319334
     
    321336
    322337                lastif = curif;
     338
    323339
    324340        next:
     
    339355
    340356        close(fd);
     357
    341358        return 0;
     359
     360
     361
     362
     363
     364
    342365}
    343366
Note: See TracChangeset for help on using the changeset viewer.