NULL a pointer after it is freed to avoid trying to free it again.

This commit is contained in:
John Birrell 1998-09-30 06:24:57 +00:00
parent a247f83316
commit 92ce833722
3 changed files with 6 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}