src/dird/dird.c
static void free_saved_resources(int table)
{
   RES *next, *res;
   int num = r_last - r_first + 1;
   RES_HEAD **res_tab = reload_table[table].res_head;

   if (res_tab == NULL) {
      Dmsg1(100, "res_tab for table %d already released.\n", table);
      return;
   }
   Dmsg1(100, "Freeing resources for table %d\n", table);
   for (int j=0; j<num; j++) {
      if (res_tab[j]) {
         next = res_tab[j]->first;
         for ( ; next; ) {
            res = next;
            next = res->res_next;
            free_resource(res, r_first + j);
         }
         free(res_tab[j]->res_list);
         free(res_tab[j]);
         res_tab[j] = NULL;
      }
   }
   free(res_tab);
   reload_table[table].job_count = 0;
   reload_table[table].res_head = NULL;
}
/*
 * This subroutine frees a saved resource table.
 *  It was saved when a new table was created with "reload"
 */
This subroutine frees a saved resource table.
It was saved when a new table was created with "reload"
This subroutine frees a saved resource table . It was saved when a new table was created with " reload "
static void free_saved_resources(int table)
{
   RES *next, *res;
   int num = r_last - r_first + 1;
   RES_HEAD **res_tab = reload_table[table].res_head;
   if (res_tab == NULL) {
      Dmsg1(100, "res_tab for table %d already released.\n", table);
      return;
   }
   Dmsg1(100, "Freeing resources for table %d\n", table);
   for (int j=0; j<num; j++) {
      if (res_tab[j]) {
         next = res_tab[j]->first;
         for ( ; next; ) {
            res = next;
            next = res->res_next;
            free_resource(res, r_first + j);
         }
         free(res_tab[j]->res_list);
         free(res_tab[j]);
         res_tab[j] = NULL;
      }
   }
   free(res_tab);
   reload_table[table].job_count = 0;
   reload_table[table].res_head = NULL;
}
static void free_saved_resources ( int table ) { RES * next , * res ; int num = r_last - r_first + 1 ; RES_HEAD * * res_tab = reload_table [ table ] . res_head ; if ( res_tab == NULL ) { Dmsg1 ( 100 , " \n " , table ) ; return ; } Dmsg1 ( 100 , " \n " , table ) ; for ( int j = 0 ; j < num ; j ++ ) { if ( res_tab [ j ] ) { next = res_tab [ j ] -> first ; for ( ; next ; ) { res = next ; next = res -> res_next ; free_resource ( res , r_first + j ) ; } free ( res_tab [ j ] -> res_list ) ; free ( res_tab [ j ] ) ; res_tab [ j ] = NULL ; } } free ( res_tab ) ; reload_table [ table ] . job_count = 0 ; reload_table [ table ] . res_head = NULL ; }
This subroutine frees a saved resource table.
This subroutine frees a saved resource table .