Deleted Added
full compact
eng_lib.c (302408) eng_lib.c (337982)
1/* crypto/engine/eng_lib.c */
2/*
3 * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project
4 * 2000.
5 */
6/* ====================================================================
1/* crypto/engine/eng_lib.c */
2/*
3 * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project
4 * 2000.
5 */
6/* ====================================================================
7 * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved.
7 * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *

--- 167 unchanged lines hidden (view full) ---

183}
184
185void engine_cleanup_add_last(ENGINE_CLEANUP_CB *cb)
186{
187 ENGINE_CLEANUP_ITEM *item;
188 if (!int_cleanup_check(1))
189 return;
190 item = int_cleanup_item(cb);
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *

--- 167 unchanged lines hidden (view full) ---

183}
184
185void engine_cleanup_add_last(ENGINE_CLEANUP_CB *cb)
186{
187 ENGINE_CLEANUP_ITEM *item;
188 if (!int_cleanup_check(1))
189 return;
190 item = int_cleanup_item(cb);
191 if (item)
192 sk_ENGINE_CLEANUP_ITEM_push(cleanup_stack, item);
191 if (item != NULL) {
192 if (sk_ENGINE_CLEANUP_ITEM_push(cleanup_stack, item) <= 0)
193 OPENSSL_free(item);
194 }
193}
194
195/* The API function that performs all cleanup */
196static void engine_cleanup_cb_free(ENGINE_CLEANUP_ITEM *item)
197{
198 (*(item->cb)) ();
199 OPENSSL_free(item);
200}

--- 147 unchanged lines hidden ---
195}
196
197/* The API function that performs all cleanup */
198static void engine_cleanup_cb_free(ENGINE_CLEANUP_ITEM *item)
199{
200 (*(item->cb)) ();
201 OPENSSL_free(item);
202}

--- 147 unchanged lines hidden ---