OLD | NEW |
1 /* crypto/objects/obj_dat.c */ | 1 /* crypto/objects/obj_dat.c */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 220 } |
221 | 221 |
222 void OBJ_cleanup(void) | 222 void OBJ_cleanup(void) |
223 { | 223 { |
224 if (obj_cleanup_defer) | 224 if (obj_cleanup_defer) |
225 { | 225 { |
226 obj_cleanup_defer = 2; | 226 obj_cleanup_defer = 2; |
227 return ; | 227 return ; |
228 } | 228 } |
229 if (added == NULL) return; | 229 if (added == NULL) return; |
230 lh_ADDED_OBJ_down_load(added) = 0; | |
231 lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup1)); /* zero counters */ | 230 lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup1)); /* zero counters */ |
232 lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup2)); /* set counters */ | 231 lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup2)); /* set counters */ |
233 lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup3)); /* free objects */ | 232 lh_ADDED_OBJ_doall(added,LHASH_DOALL_FN(cleanup3)); /* free objects */ |
234 lh_ADDED_OBJ_free(added); | 233 lh_ADDED_OBJ_free(added); |
235 added=NULL; | 234 added=NULL; |
236 } | 235 } |
237 | 236 |
238 int OBJ_new_nid(int num) | 237 int OBJ_new_nid(int num) |
239 { | 238 { |
240 int i; | 239 int i; |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln); | 800 op=(ASN1_OBJECT *)ASN1_OBJECT_create(OBJ_new_nid(1),buf,i,sn,ln); |
802 if (op == NULL) | 801 if (op == NULL) |
803 goto err; | 802 goto err; |
804 ok=OBJ_add_object(op); | 803 ok=OBJ_add_object(op); |
805 err: | 804 err: |
806 ASN1_OBJECT_free(op); | 805 ASN1_OBJECT_free(op); |
807 OPENSSL_free(buf); | 806 OPENSSL_free(buf); |
808 return(ok); | 807 return(ok); |
809 } | 808 } |
810 | 809 |
OLD | NEW |