mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Initialization, memory leak.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/concrete@10732 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
891e33bf47
commit
96e537f08d
@ -2071,6 +2071,9 @@ s_init(struct species *s_ptr)
|
||||
s_ptr->gfw = 0.0;
|
||||
s_ptr->z = 0.0;
|
||||
s_ptr->dw = 0.0;
|
||||
s_ptr->dw_t = 0.0;
|
||||
s_ptr->dw_a = 0.0;
|
||||
s_ptr->dw_a_exp = 0.0;
|
||||
s_ptr->erm_ddl = 1.0;
|
||||
s_ptr->equiv = 0;
|
||||
s_ptr->alk = 0.0;
|
||||
@ -2086,6 +2089,10 @@ s_init(struct species *s_ptr)
|
||||
{
|
||||
s_ptr->logk[i] = 0.0;
|
||||
}
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
s_ptr->Jones_Dole[i] = 0.0;
|
||||
}
|
||||
/* VP: Density Start */
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
@ -2109,8 +2116,6 @@ s_init(struct species *s_ptr)
|
||||
s_ptr->next_secondary = NULL;
|
||||
s_ptr->next_sys_total = NULL;
|
||||
s_ptr->check_equation = TRUE;
|
||||
s_ptr->original_deltav_units = cm3_per_mol;
|
||||
|
||||
s_ptr->rxn = NULL;
|
||||
s_ptr->rxn_s = NULL;
|
||||
s_ptr->rxn_x = NULL;
|
||||
@ -2124,6 +2129,7 @@ s_init(struct species *s_ptr)
|
||||
{
|
||||
s_ptr->dz[i] = 0.0;
|
||||
}
|
||||
s_ptr->original_deltav_units = cm3_per_mol;
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
@ -907,6 +907,10 @@ transport(void)
|
||||
ct[i].J_ij_il = (struct J_ij *) free_check_null(ct[i].J_ij_il);
|
||||
}
|
||||
ct = (struct CT *) free_check_null(ct);
|
||||
for (int i = 0; i < count_elements; i++)
|
||||
{
|
||||
moles_added[i].name = (char *) free_check_null(moles_added[i].name);
|
||||
}
|
||||
moles_added = (struct MOLES_ADDED *) free_check_null(moles_added);
|
||||
}
|
||||
//if (dV_dcell)
|
||||
@ -2215,6 +2219,7 @@ find_J(int icell, int jcell, LDBLE mixf, LDBLE DDt, int stagnant)
|
||||
LDBLE g, g_i, g_j;
|
||||
char token[MAX_LENGTH], token1[MAX_LENGTH];
|
||||
|
||||
dl_aq_i = dl_aq_j = 0.0;
|
||||
por_il12 = A_i = A_j =0.0;
|
||||
cec1 = cec2 = cec12 = rc1 = rc2 = 0.0;
|
||||
dV = 0.0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user