aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dso/dso_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 10:02:07 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 10:02:07 -0400
commitb548a1f11c06ccdfa4f52a539912d22d77ee309e (patch)
tree37ff8792ddf09e4805aa3ba76b805923d3c52734 /crypto/dso/dso_lib.c
parent33fbca83dcd05b77f807fab205c4523b8cfe85b5 (diff)
downloadopenssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.tar.gz
free null cleanup finale
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/dso/dso_lib.c')
-rw-r--r--crypto/dso/dso_lib.c10
1 files changed, 3 insertions, 7 deletions
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);
}