forked from Imagelibrary/binutils-gdb
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