mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
NULL a pointer after it is freed to avoid trying to free it again.
This commit is contained in:
parent
a247f83316
commit
92ce833722
3 changed files with 6 additions and 0 deletions
|
|
@ -119,10 +119,12 @@ _thread_cleanupspecific(void)
|
|||
destructor(data);
|
||||
} else {
|
||||
free(_thread_run->specific_data);
|
||||
_thread_run->specific_data = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
_thread_run->specific_data = NULL;
|
||||
free(_thread_run->specific_data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,10 +119,12 @@ _thread_cleanupspecific(void)
|
|||
destructor(data);
|
||||
} else {
|
||||
free(_thread_run->specific_data);
|
||||
_thread_run->specific_data = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
_thread_run->specific_data = NULL;
|
||||
free(_thread_run->specific_data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -119,10 +119,12 @@ _thread_cleanupspecific(void)
|
|||
destructor(data);
|
||||
} else {
|
||||
free(_thread_run->specific_data);
|
||||
_thread_run->specific_data = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
_thread_run->specific_data = NULL;
|
||||
free(_thread_run->specific_data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue