app_server: We must clone the name in MessageLooper().

A number of things that pass it in have it as a stack temporary.
This commit is contained in:
Augustin Cavalier 2019-07-28 15:03:42 -04:00
parent 1b333570b5
commit bae7a949c5

View File

@ -18,7 +18,7 @@
MessageLooper::MessageLooper(const char* name)
:
BLocker(name),
fName(name),
fName(strdup(name)),
fThread(-1),
fQuitting(false),
fDeathSemaphore(-1)
@ -28,6 +28,7 @@ MessageLooper::MessageLooper(const char* name)
MessageLooper::~MessageLooper()
{
free((void*)fName);
}