blob: 03b4bd36ffa1f5ea0287c159f754407bda34eece [file] [log] [blame]
Gilles Peskine1c0e48a2021-02-24 18:37:46 +01001/* BEGIN_HEADER */
2
3#include "mbedtls/net_sockets.h"
4
5/* END_HEADER */
6
7/* BEGIN_DEPENDENCIES
8 * depends_on:MBEDTLS_NET_C
9 * END_DEPENDENCIES
10 */
11
12/* BEGIN_CASE */
13void context_init_free( int reinit )
14{
15 mbedtls_net_context ctx;
16
17 mbedtls_net_init( &ctx );
18 mbedtls_net_free( &ctx );
19
20 if( reinit )
21 mbedtls_net_init( &ctx );
22 mbedtls_net_free( &ctx );
23
24 /* This test case always succeeds, functionally speaking. A plausible
25 * bug might trigger an invalid pointer dereference or a memory leak. */
26 goto exit;
27}
28/* END_CASE */