mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-01 08:54:44 +08:00
Make free_current_contents more robust. Use in MI.
This commit is contained in:
@ -390,8 +390,13 @@ void
|
||||
free_current_contents (void *ptr)
|
||||
{
|
||||
void **location = ptr;
|
||||
if (location == NULL)
|
||||
internal_error ("free_current_contents: NULL pointer");
|
||||
if (*location != NULL)
|
||||
free (*location);
|
||||
{
|
||||
free (*location);
|
||||
*location = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Provide a known function that does nothing, to use as a base for
|
||||
|
Reference in New Issue
Block a user