OLD | NEW |
1 #include <stdio.h> | 1 #include <stdio.h> |
2 #include <stdlib.h> | 2 #include <stdlib.h> |
3 #include <string.h> | 3 #include <string.h> |
4 | 4 |
5 #include <openssl/err.h> | 5 #include <openssl/err.h> |
6 #include <openssl/lhash.h> | 6 #include <openssl/lhash.h> |
7 #include <openssl/objects.h> | 7 #include <openssl/objects.h> |
8 #include <openssl/safestack.h> | 8 #include <openssl/safestack.h> |
9 #include <openssl/e_os2.h> | 9 #include <openssl/e_os2.h> |
10 | 10 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 static IMPLEMENT_LHASH_DOALL_FN(names_lh_free, OBJ_NAME) | 344 static IMPLEMENT_LHASH_DOALL_FN(names_lh_free, OBJ_NAME) |
345 | 345 |
346 static void name_funcs_free(NAME_FUNCS *ptr) | 346 static void name_funcs_free(NAME_FUNCS *ptr) |
347 { | 347 { |
348 OPENSSL_free(ptr); | 348 OPENSSL_free(ptr); |
349 } | 349 } |
350 | 350 |
351 void OBJ_NAME_cleanup(int type) | 351 void OBJ_NAME_cleanup(int type) |
352 { | 352 { |
353 unsigned long down_load; | |
354 | |
355 if (names_lh == NULL) return; | 353 if (names_lh == NULL) return; |
356 | 354 |
357 free_type=type; | 355 free_type=type; |
358 down_load=lh_OBJ_NAME_down_load(names_lh); | |
359 lh_OBJ_NAME_down_load(names_lh)=0; | |
360 | 356 |
361 lh_OBJ_NAME_doall(names_lh,LHASH_DOALL_FN(names_lh_free)); | 357 lh_OBJ_NAME_doall(names_lh,LHASH_DOALL_FN(names_lh_free)); |
362 if (type < 0) | 358 if (type < 0) |
363 { | 359 { |
364 lh_OBJ_NAME_free(names_lh); | 360 lh_OBJ_NAME_free(names_lh); |
365 sk_NAME_FUNCS_pop_free(name_funcs_stack,name_funcs_free); | 361 sk_NAME_FUNCS_pop_free(name_funcs_stack,name_funcs_free); |
366 names_lh=NULL; | 362 names_lh=NULL; |
367 name_funcs_stack = NULL; | 363 name_funcs_stack = NULL; |
368 } | 364 } |
369 else | |
370 lh_OBJ_NAME_down_load(names_lh)=down_load; | |
371 } | 365 } |
372 | 366 |
OLD | NEW |