mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-14 09:47:30 -05:00
TIME: Set Allocated Pointers to NULL after free()'d;
This commit is contained in:
18
src/dmr_ms.c
18
src/dmr_ms.c
@@ -374,7 +374,11 @@ void dmrMS (dsd_opts * opts, dsd_state * state)
|
||||
state->dmr_ms_rc = 0;
|
||||
state->directmode = 0; //flag off
|
||||
|
||||
if (timestr != NULL) free (timestr);
|
||||
if (timestr != NULL)
|
||||
{
|
||||
free (timestr);
|
||||
timestr = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -618,7 +622,11 @@ void dmrMSBootstrap (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
//errors due to skipping other slot
|
||||
// cach_err = dmr_cach (opts, state, cachdata);
|
||||
if (timestr != NULL) free (timestr);
|
||||
if (timestr != NULL)
|
||||
{
|
||||
free (timestr);
|
||||
timestr = NULL;
|
||||
}
|
||||
|
||||
skipDibit (opts, state, 144); //skip to next TDMA slot
|
||||
dmrMS (opts, state); //bootstrap into full TDMA frame
|
||||
@@ -689,6 +697,10 @@ void dmrMSData (dsd_opts * opts, dsd_state * state)
|
||||
state->dmr_stereo_payload[i+66] = 1; ////set to one so first frame will fail intentionally instead of zero fill
|
||||
}
|
||||
|
||||
if (timestr != NULL) free (timestr);
|
||||
if (timestr != NULL)
|
||||
{
|
||||
free (timestr);
|
||||
timestr = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user