- Port & Thread string's name allocation was messed and used in InitCheck.
- Style, spacing binary operator git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34881 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d923116745
commit
23992a691c
@ -22,10 +22,13 @@ public:
|
|||||||
fInformation.func = handler;
|
fInformation.func = handler;
|
||||||
fInformation.port = &fPort;
|
fInformation.port = &fPort;
|
||||||
|
|
||||||
InitCheck();
|
|
||||||
fPortName = strdup(name);
|
fPortName = strdup(name);
|
||||||
fThreadName = strdup(name);
|
|
||||||
|
fThreadName = (char*)malloc(strlen(name) + strlen(" thread") + 1);
|
||||||
|
fThreadName = strcpy(fThreadName, fPortName);
|
||||||
fThreadName = strcat(fThreadName, " thread");
|
fThreadName = strcat(fThreadName, " thread");
|
||||||
|
|
||||||
|
InitCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -37,8 +40,8 @@ public:
|
|||||||
// Closing the port should provoke the thread to finish
|
// Closing the port should provoke the thread to finish
|
||||||
wait_for_thread(fThread, &status);
|
wait_for_thread(fThread, &status);
|
||||||
|
|
||||||
delete fThreadName;
|
free(fThreadName);
|
||||||
delete fPortName;
|
free(fPortName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user