NULL a pointer after it is freed to avoid trying to free it again.
This commit is contained in:
parent
a247f83316
commit
92ce833722
@ -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 New Issue
Block a user