File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Windows/sgx/libsgx_tsgxssl Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ extern "C" {
78
78
}
79
79
80
80
if (sgx_thread_mutex_init (mutex, NULL ) != 0 ) {
81
+ delete mutex;
81
82
errno = EINVAL;
82
83
FEND;
83
84
return 0 ;
@@ -88,10 +89,10 @@ extern "C" {
88
89
}
89
90
catch (std::bad_alloc e)
90
91
{
91
- sgx_spin_unlock (&mutex_map_lock);
92
92
(void )e; // remove warning
93
93
if (p_mutex_dat != NULL ) // second memory allocation failed
94
94
delete p_mutex_dat;
95
+ delete mutex;
95
96
errno = ENOMEM;
96
97
FEND;
97
98
return 0 ;
@@ -200,10 +201,12 @@ extern "C" {
200
201
}
201
202
202
203
// Free mutex and delete the mutex_it
204
+ mutex_count * p_mutex_count = it->second ;
203
205
sgx_thread_mutex_t * mutex_it = it->second ->mutex ;
204
206
205
207
sgx_thread_mutex_destroy (mutex_it);
206
208
delete mutex_it;
209
+ delete p_mutex_count;
207
210
208
211
// delete the mutex_info_map entry
209
212
mutex_info_map.erase (it);
@@ -213,7 +216,4 @@ extern "C" {
213
216
FEND;
214
217
return ;
215
218
}
216
-
217
-
218
-
219
219
}
You can’t perform that action at this time.
0 commit comments