<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40209 >
2008/4/21, Marko Lindqvist <[EMAIL PROTECTED]>: > > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=40209 > > > > On 21/04/2008, Elmo Todurov wrote: > > > > Now I want a cookie! > > $ svn diff > > Index: server/sernet.c > > =================================================================== > > --- server/sernet.c (revision 14605) > > +++ server/sernet.c (working copy) > > @@ -185,6 +185,7 @@ > > line_internal = local_to_internal_string_malloc(line); > > (void) handle_stdin_input(NULL, line_internal, FALSE); > > free(line_internal); > > + free(line); > > > > readline_handled_input = TRUE; > > } > > > Are you sure about this? Does readline really expect callback to free > the line? (and if it does, can it be bug in the specific readline > version you are using?) > > > > - ML A cursory look suggests Elmo is right. That you should free the returned line is explicitly mentioned when using the readline() call: http://www.delorie.com/gnu/docs/readline/rlman_24.html#IDX174 No further mention at the reference for the alternative interface: http://www.delorie.com/gnu/docs/readline/rlman_41.html#IDX288 Ulrik _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev