From b548a1f11c06ccdfa4f52a539912d22d77ee309e Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 1 May 2015 10:02:07 -0400 Subject: free null cleanup finale Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte --- crypto/dso/dso_lib.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'crypto/dso/dso_lib.c') diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c index c1d6d2544f..a33a8a85bb 100644 --- a/crypto/dso/dso_lib.c +++ b/crypto/dso/dso_lib.c @@ -162,11 +162,8 @@ int DSO_free(DSO *dso) } sk_void_free(dso->meth_data); - if (dso->filename != NULL) - OPENSSL_free(dso->filename); - if (dso->loaded_filename != NULL) - OPENSSL_free(dso->loaded_filename); - + OPENSSL_free(dso->filename); + OPENSSL_free(dso->loaded_filename); OPENSSL_free(dso); return (1); } @@ -360,8 +357,7 @@ int DSO_set_filename(DSO *dso, const char *filename) return (0); } BUF_strlcpy(copied, filename, strlen(filename) + 1); - if (dso->filename) - OPENSSL_free(dso->filename); + OPENSSL_free(dso->filename); dso->filename = copied; return (1); } -- cgit v1.2.3