File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ OSThread::~OSThread() {
44
44
}
45
45
timeline_block_ = NULL ;
46
46
delete timeline_block_lock_;
47
+ free (name_);
47
48
}
48
49
49
50
Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ class OSThread : public BaseThread {
75
75
void set_name (const char * name) {
76
76
ASSERT (OSThread::Current () == this );
77
77
ASSERT (name_ == NULL );
78
- name_ = name;
78
+ ASSERT (name != NULL );
79
+ name_ = strdup (name);
79
80
}
80
81
81
82
Mutex* timeline_block_lock () const {
@@ -202,7 +203,7 @@ class OSThread : public BaseThread {
202
203
const ThreadId id_;
203
204
const ThreadId join_id_;
204
205
const ThreadId trace_id_; // Used to interface with tracing tools.
205
- const char * name_; // A name for this thread.
206
+ char * name_; // A name for this thread.
206
207
207
208
Mutex* timeline_block_lock_;
208
209
TimelineEventBlock* timeline_block_;
You can’t perform that action at this time.
0 commit comments