File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -325,12 +325,10 @@ void run_scratch_tests(void) {
325
325
secp256k1_scratch_space * scratch ;
326
326
secp256k1_scratch_space local_scratch ;
327
327
328
- ctx = secp256k1_context_create (SECP256K1_CONTEXT_NONE );
329
-
330
- /* Test public API */
331
328
secp256k1_context_set_illegal_callback (ctx , counting_illegal_callback_fn , & ecount );
332
329
secp256k1_context_set_error_callback (ctx , counting_illegal_callback_fn , & ecount );
333
330
331
+ /* Test public API */
334
332
scratch = secp256k1_scratch_space_create (ctx , 1000 );
335
333
CHECK (scratch != NULL );
336
334
CHECK (ecount == 0 );
@@ -397,7 +395,9 @@ void run_scratch_tests(void) {
397
395
398
396
/* cleanup */
399
397
secp256k1_scratch_space_destroy (ctx , NULL ); /* no-op */
400
- secp256k1_context_destroy (ctx );
398
+
399
+ secp256k1_context_set_illegal_callback (ctx , NULL , NULL );
400
+ secp256k1_context_set_error_callback (ctx , NULL , NULL );
401
401
}
402
402
403
403
You can’t perform that action at this time.
0 commit comments