diff --git a/src/cas/io/bsdSocket/casDGIntfIO.cc b/src/cas/io/bsdSocket/casDGIntfIO.cc index 68d772c4f..35ab86967 100644 --- a/src/cas/io/bsdSocket/casDGIntfIO.cc +++ b/src/cas/io/bsdSocket/casDGIntfIO.cc @@ -117,11 +117,7 @@ casDGIntfIO::casDGIntfIO (caServerI &serverIn, const caNetAddr &addr, else { // avoid use of ellFree because problems on windows occur if the // free is in a different DLL than the malloc - ELLNODE * nnode = BCastAddrList.node.next; - while ( nnode ) - { - ELLNODE * pnode = nnode; - nnode = nnode->next; + while ( ELLNODE * pnode = ellGet ( & BCastAddrList ) ) { free ( pnode ); } }