From: Ryan Underwood Date: Mon, 25 May 2015 19:07:15 +0000 (-0700) Subject: Don't bother freeing ping buffer X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9949c92c2bcdcdb1df13958bf6e242266d49acac;p=fping.git Don't bother freeing ping buffer --- diff --git a/src/fping.c b/src/fping.c index 9f07f47..b11a395 100644 --- a/src/fping.c +++ b/src/fping.c @@ -342,31 +342,9 @@ void ev_remove(HOST_ENTRY *h); void add_cidr(char *); void add_range(char *, char *); void print_warning(char *fmt, ...); -void free_ping_buffer( void ); /*** function definitions ***/ -/************************************************************ - - Function: free_ping_buffer - -************************************************************* - - Inputs: void (none) - - Description: - - Free the ping packet buffer. - -************************************************************/ - -void free_ping_buffer( void ) -{ - if (ping_buffer != NULL) { - free( ping_buffer ); - } -} - /************************************************************ Function: main @@ -845,12 +823,6 @@ int main( int argc, char **argv ) if( !ping_buffer ) crash_and_burn( "can't malloc ping packet" ); - if ( atexit( free_ping_buffer ) < 0 ) - { - perror("atexit"); - exit(1); - } - signal( SIGINT, finish ); gettimeofday( &start_time, &tz );