]> git.gsnw.org Git - fping.git/commitdiff
Don't bother freeing ping buffer
authorRyan Underwood <nemesis@icequake.net>
Mon, 25 May 2015 19:07:15 +0000 (12:07 -0700)
committerRyan C. Underwood <nemesis@icequake.net>
Mon, 25 May 2015 19:07:15 +0000 (12:07 -0700)
src/fping.c

index 9f07f470219a03dc95f2741bd84e66617c8d490e..b11a3957a96abee59adf81185a45707c4f7c469d 100644 (file)
@@ -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 );