X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Ftls_m.c;h=c1d0c2eefe4384aa03cf437ecdead3e3ed235cf9;hb=dbb89a64da5651cf8d61524f6cd5cd083f99a570;hp=36dc989ef0c42fd84f226a6194e8ec2b10a5ccae;hpb=b9c0ed41acc23e37a9365482dc78f60eff84b757;p=openldap diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c index 36dc989ef0..c1d0c2eefe 100644 --- a/libraries/libldap/tls_m.c +++ b/libraries/libldap/tls_m.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2008-2013 The OpenLDAP Foundation. + * Copyright 2008-2014 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -2066,8 +2066,10 @@ tlsm_ctx_free ( tls_ctx *ctx ) errcode, PR_ErrorToString( errcode, PR_LANGUAGE_I_DEFAULT ), 0 ); } } - PL_strfree( c->tc_pin_file ); - c->tc_pin_file = NULL; + if ( c->tc_pin_file ) { + PL_strfree( c->tc_pin_file ); + c->tc_pin_file = NULL; + } tlsm_free_pem_objs( c ); #ifdef HAVE_NSS_INITCONTEXT if ( c->tc_initctx ) { @@ -2317,7 +2319,8 @@ tlsm_deferred_ctx_init( void *arg ) return rc; } } else { - PL_strfree( ctx->tc_pin_file ); + if ( ctx->tc_pin_file ) + PL_strfree( ctx->tc_pin_file ); ctx->tc_pin_file = PL_strdup( lt->lt_keyfile ); } }