diff options
author | jsing <> | 2014-05-28 13:03:25 +0000 |
---|---|---|
committer | jsing <> | 2014-05-28 13:03:25 +0000 |
commit | 1904ce01988b6ea0f5775507b4d812459c5b3f50 (patch) | |
tree | 60af46eb8cb0fcb0e51840739e416c98c124d73c /src/lib/libssl/bio_ssl.c | |
parent | 60cd1d60f58b32225afb881559d08dbc68a2eb79 (diff) | |
download | openbsd-1904ce01988b6ea0f5775507b4d812459c5b3f50.tar.gz openbsd-1904ce01988b6ea0f5775507b4d812459c5b3f50.tar.bz2 openbsd-1904ce01988b6ea0f5775507b4d812459c5b3f50.zip |
There is no point in checking if a pointer is non-NULL before calling free,
since free already does this for us. Also remove some pointless NULL
assignments, where the result from malloc(3) is immediately assigned to the
same variable.
ok miod@
Diffstat (limited to 'src/lib/libssl/bio_ssl.c')
-rw-r--r-- | src/lib/libssl/bio_ssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libssl/bio_ssl.c b/src/lib/libssl/bio_ssl.c index 5b14ea3824..8ffbe0a67a 100644 --- a/src/lib/libssl/bio_ssl.c +++ b/src/lib/libssl/bio_ssl.c | |||
@@ -132,8 +132,7 @@ ssl_free(BIO *a) | |||
132 | a->init = 0; | 132 | a->init = 0; |
133 | a->flags = 0; | 133 | a->flags = 0; |
134 | } | 134 | } |
135 | if (a->ptr != NULL) | 135 | free(a->ptr); |
136 | free(a->ptr); | ||
137 | return (1); | 136 | return (1); |
138 | } | 137 | } |
139 | 138 | ||