AW: [En-Nut-Discussion] Chat module memory leaks

Louis Beaudoin deoxy at
Thu May 13 19:06:46 CEST 2004

Hi Oliver,

I was working with the chat module from version 3.4.2.  The problems 
still exist in the latest chat from CVS.  I used ExamDiff (Windows 
program) to create the diff file, but I got the same output using GNU 
diff from the commandline just now.  Perhaps there's an option I'm not 


Oliver Schulz wrote:
> Hi Louis,
> because you're using a diff format, that I don't know (looks a bit too simple), it's hard to recognize to which version of the source file you made that diff. I assume the file is /dev/chat.c, but we have several releases and some current development, where especially the line numbers are shifted and so on....
> Can you tell me what release you're using, or better tell me the version number from the file. You can find the version number after the copyright annotation.
> ..or just use the GNU diffutils. :-)
> Oliver.
>>-----Ursprüngliche Nachricht-----
>>Von: en-nut-discussion-bounces at
>>[mailto:en-nut-discussion-bounces at]Im Auftrag von Louis
>>Gesendet: Dienstag, 11. Mai 2004 21:23
>>An: en-nut-discussion at
>>Betreff: [En-Nut-Discussion] Chat module memory leaks
>>Hi all,
>>The chat module loses memory when using the "REPORT" command.  The 
>>report buffer is allocated more than once, and the report 
>>search buffer 
>>is not freed when the NUTCHAT structure is destroyed.
>>Additionally, the '^' character cannot be sent with the current code, 
>>and our modem, the Siemens MC56 uses this in AT commands.  I added 
>>support for this character by sending "\^"
>>Diff below
>>Louis Beaudoin
>> >             case '^':
>> >                 ch = '^';
>> >                 break;
>> >                 case '^':
>> >                     *cp++ = '^';
>> >                     break;
>><         chat_report = malloc(CHAT_MAX_REPORT_SIZE+1);
>> >         if(!chat_report)
>> >             chat_report = malloc(CHAT_MAX_REPORT_SIZE+1);
>> >         if(ci->chat_report_search)
>> >             free(ci->chat_report_search);
>>En-Nut-Discussion mailing list
>>En-Nut-Discussion at
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at

More information about the En-Nut-Discussion mailing list