Commit e0428fce authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

initialize taxisptr->units to NULL after calling delete_refcount_string() [Bug #7691].

parent 9f5c5917
......@@ -2,6 +2,10 @@
* Version 1.8.2 released
2017-04-25 Uwe Schulzweida
* initialize taxisptr->units to NULL after calling delete_refcount_string() [Bug #7691]
2017-04-21 Uwe Schulzweida
* gribapiGetDiskRepresentation: Wrong result with SZIP compressed GRIB records [Bug #7650]
......
......@@ -299,7 +299,11 @@ void taxisDefType(int taxisID, int type)
if ( taxisptr->type != type )
{
taxisptr->type = type;
if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
if ( taxisptr->units )
{
delete_refcount_string(taxisptr->units);
taxisptr->units = NULL;
}
reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
}
}
......@@ -375,7 +379,11 @@ void taxisDefRdate(int taxisID, int rdate)
if (taxisptr->rdate != rdate)
{
taxisptr->rdate = rdate;
if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
if ( taxisptr->units )
{
delete_refcount_string(taxisptr->units);
taxisptr->units = NULL;
}
reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
}
}
......@@ -401,7 +409,11 @@ void taxisDefRtime(int taxisID, int rtime)
if (taxisptr->rtime != rtime)
{
taxisptr->rtime = rtime;
if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
if ( taxisptr->units )
{
delete_refcount_string(taxisptr->units);
taxisptr->units = NULL;
}
reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
}
}
......@@ -491,7 +503,11 @@ void taxisDefTunit(int taxisID, int unit)
if (taxisptr->unit != unit)
{
taxisptr->unit = unit;
if ( taxisptr->units ) delete_refcount_string(taxisptr->units);
if ( taxisptr->units )
{
delete_refcount_string(taxisptr->units);
taxisptr->units = NULL;
}
reshSetStatus(taxisID, &taxisOps, RESH_DESYNC_IN_USE);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment