vic/drivers/classic/src/alloc_veg_hist.c
void
free_veg_hist(int                nrecs,
              int                nveg,
              veg_hist_struct ***veg_hist)
{
    int i, j;

    if (*veg_hist == NULL) {
        return;
    }

    for (i = 0; i < nrecs; i++) {
        for (j = 0; j < nveg + 1; j++) {
            free((*veg_hist)[i][j].albedo);
            free((*veg_hist)[i][j].displacement);
            free((*veg_hist)[i][j].fcanopy);
            free((*veg_hist)[i][j].LAI);
            free((*veg_hist)[i][j].roughness);
        }
        free((*veg_hist)[i]);
    }

    free(*veg_hist);
}
/******************************************************************************
 * @brief    Free veg hist structure.
 *****************************************************************************/
@brief    Free veg hist structure.
@brief Free veg hist structure .
void
free_veg_hist(int                nrecs,
              int                nveg,
              veg_hist_struct ***veg_hist)
{
    int i, j;
    if (*veg_hist == NULL) {
        return;
    }
    for (i = 0; i < nrecs; i++) {
        for (j = 0; j < nveg + 1; j++) {
            free((*veg_hist)[i][j].albedo);
            free((*veg_hist)[i][j].displacement);
            free((*veg_hist)[i][j].fcanopy);
            free((*veg_hist)[i][j].LAI);
            free((*veg_hist)[i][j].roughness);
        }
        free((*veg_hist)[i]);
    }
    free(*veg_hist);
}
void free_veg_hist ( int nrecs , int nveg , veg_hist_struct * * * veg_hist ) { int i , j ; if ( * veg_hist == NULL ) { return ; } for ( i = 0 ; i < nrecs ; i ++ ) { for ( j = 0 ; j < nveg + 1 ; j ++ ) { free ( ( * veg_hist ) [ i ] [ j ] . albedo ) ; free ( ( * veg_hist ) [ i ] [ j ] . displacement ) ; free ( ( * veg_hist ) [ i ] [ j ] . fcanopy ) ; free ( ( * veg_hist ) [ i ] [ j ] . LAI ) ; free ( ( * veg_hist ) [ i ] [ j ] . roughness ) ; } free ( ( * veg_hist ) [ i ] ) ; } free ( * veg_hist ) ; }
@brief    Free veg hist structure.
@brief Free veg hist structure .