[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Memory Leak in LS Routing Code




Thanks for fixing the bug. I will add it in ns' bug-fix page.

Thanks,
--Padma

On Thu, 24 May 2001, Ming Feng wrote:


> Hi,
>
> Yes, it is a serious problem. Please modify the void computeRoutes()
> in ls.h as follows:
>
> 	void computeRoutes() {
> 		if (routingTablePtr_ != NULL)
> 			delete routingTablePtr_;
> 		routingTablePtr_ = _computeRoutes();
> 	}
>
> Cheers,
>
> Ming Feng
>
> >From: "Shekhar Kshirsagar" <[email protected]>
> >To: [email protected]
> >Subject: [ns] Memory Leak in LS Routing Code
> >Date: Wed, 23 May 2001 16:20:05 -0700
> >MIME-Version: 1.0
> >
> >Hi,
> >
> >It looks like there is a memory leak in the Link State Routing Code,
> >everytime computeRoutes is called.
> >If somebody else has noticed it, can you please confirm if this is true?
> >
> >Everytime LsRouting::computeRoutes function from file linkstate/ls.h is
> >called, it seems to assign the
> >new Routing Table returned by LsRouting::_computeRoutes to the pointer,
> >routingTablePtr_.
> >But I don't see any place where it is deleting the previously allocated
> >routingTablePtr_.
> >
> >Thanks,
> >Shekhar
> >
> >
> >
>

-- 
------------------------------------------------
Be true to your work, your word, and your friend.
--Thoreau

Padmaparna Haldar