From: Joerg H. <jo...@de...> - 2004-05-17 09:10:14
|
On Mon, May 17, 2004 at 10:59:27AM +0200, Jan Patera wrote: > Hi, > > I strongly agree with this your proposal. I also wanted to do it when > I was playing with saving last week (I did it just for one function). > BTW, your following code introduces memory leak: > > > - *d = realloc (*d, sizeof (char) * *ds); > > + *d = realloc (*d, *ds); > > + if (!*d) > > + return; > > If realloc fails, the pointer originally stored in *d is lost. Yes, you're right. But since the error handling is broken on this function, it doesn't make a difference ... :-| I'll fix it Joerg -- Fachbegriffe der Informatik (Nr 230): Deadlock - Einsperren des Admins im Serverraum. Manfred Worm Schäfer |