Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  09 Jun 2012, Greg Christian, Bug Report, _net_send_buffer realloc 
    Reply  10 Jun 2012, Konstantin Olchanski, Bug Report, _net_send_buffer realloc 
       Reply  10 Jun 2012, Greg Christian, Bug Report, _net_send_buffer realloc 
          Reply  11 Jun 2012, Konstantin Olchanski, Bug Report, _net_send_buffer realloc 
    Reply  15 Jun 2012, Konstantin Olchanski, Bug Report, _net_send_buffer realloc 
Message ID: 793     Entry time: 11 Jun 2012     In reply to: 792
Author: Konstantin Olchanski 
Topic: Bug Report 
Subject: _net_send_buffer realloc 
> > > In midas.c, ...
> > >
> > > 1) _net_send_buffer is not set to NULL when declared.
> 
> Ah,okay. I was not aware of this feature of global variables.
> 

RTFM K&R "The C programming language". 
http://en.wikipedia.org/wiki/The_C_Programming_Language

>  
> > > 2) cm_disconect_experiment() calls free(_net_send_buffer) but does not set 
> its value to NULL.
>

Confirmed. Sorry for confusion in my previous message. Set the pointer to NULL after free() is good practice.

But note that calling cm_connect and cm_disconnect multiple times is unusual use of MIDAS and you will most 
likely find more breakage.

K.O.
ELOG V3.1.4-2e1708b5