Changeset 4583
- Timestamp:
- 11/05/08 13:37:37 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/libstrongswan/plugins/openssl/openssl_plugin.c
r4579 r4583 51 51 * Array of static mutexs, with CRYPTO_num_locks() mutex 52 52 */ 53 static mutex_t **mutex ;53 static mutex_t **mutex = NULL; 54 54 55 55 /** … … 58 58 static void locking_function(int mode, int type, const char *file, int line) 59 59 { 60 if (mode & CRYPTO_LOCK) 61 { 62 mutex[type]->lock(mutex[type]); 63 } 64 else 65 { 66 mutex[type]->unlock(mutex[type]); 60 if (mutex) 61 { 62 if (mode & CRYPTO_LOCK) 63 { 64 mutex[type]->lock(mutex[type]); 65 } 66 else 67 { 68 mutex[type]->unlock(mutex[type]); 69 } 67 70 } 68 71 } … … 156 159 } 157 160 free(mutex); 161 mutex = NULL; 158 162 } 159 163 … … 182 186 ENGINE_cleanup(); 183 187 EVP_cleanup(); 188 189 threading_cleanup(); 184 190 185 191 free(this);
