diff options
| author | beck <> | 2014-04-17 13:37:50 +0000 |
|---|---|---|
| committer | beck <> | 2014-04-17 13:37:50 +0000 |
| commit | 6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd (patch) | |
| tree | 7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libssl/d1_lib.c | |
| parent | 4d13fb9c7b5ac7311d7031173c21ab0121388413 (diff) | |
| download | openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.tar.gz openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.tar.bz2 openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.zip | |
Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes:
OPENSSL_malloc->malloc
OPENSSL_free->free
OPENSSL_relloc->realloc
OPENSSL_freeFunc->free
Diffstat (limited to 'src/lib/libssl/d1_lib.c')
| -rw-r--r-- | src/lib/libssl/d1_lib.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c index 73c44c807a..7da57b0a36 100644 --- a/src/lib/libssl/d1_lib.c +++ b/src/lib/libssl/d1_lib.c | |||
| @@ -100,7 +100,7 @@ dtls1_new(SSL *s) | |||
| 100 | 100 | ||
| 101 | if (!ssl3_new(s)) | 101 | if (!ssl3_new(s)) |
| 102 | return (0); | 102 | return (0); |
| 103 | if ((d1 = OPENSSL_malloc(sizeof *d1)) == NULL) return (0); | 103 | if ((d1 = malloc(sizeof *d1)) == NULL) return (0); |
| 104 | memset(d1, 0, sizeof *d1); | 104 | memset(d1, 0, sizeof *d1); |
| 105 | 105 | ||
| 106 | /* d1->handshake_epoch=0; */ | 106 | /* d1->handshake_epoch=0; */ |
| @@ -128,7 +128,7 @@ dtls1_new(SSL *s) | |||
| 128 | pqueue_free(d1->sent_messages); | 128 | pqueue_free(d1->sent_messages); |
| 129 | if (d1->buffered_app_data.q) | 129 | if (d1->buffered_app_data.q) |
| 130 | pqueue_free(d1->buffered_app_data.q); | 130 | pqueue_free(d1->buffered_app_data.q); |
| 131 | OPENSSL_free(d1); | 131 | free(d1); |
| 132 | return (0); | 132 | return (0); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| @@ -147,39 +147,39 @@ dtls1_clear_queues(SSL *s) | |||
| 147 | while ((item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL) { | 147 | while ((item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL) { |
| 148 | rdata = (DTLS1_RECORD_DATA *) item->data; | 148 | rdata = (DTLS1_RECORD_DATA *) item->data; |
| 149 | if (rdata->rbuf.buf) { | 149 | if (rdata->rbuf.buf) { |
| 150 | OPENSSL_free(rdata->rbuf.buf); | 150 | free(rdata->rbuf.buf); |
| 151 | } | 151 | } |
| 152 | OPENSSL_free(item->data); | 152 | free(item->data); |
| 153 | pitem_free(item); | 153 | pitem_free(item); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | while ((item = pqueue_pop(s->d1->processed_rcds.q)) != NULL) { | 156 | while ((item = pqueue_pop(s->d1->processed_rcds.q)) != NULL) { |
| 157 | rdata = (DTLS1_RECORD_DATA *) item->data; | 157 | rdata = (DTLS1_RECORD_DATA *) item->data; |
| 158 | if (rdata->rbuf.buf) { | 158 | if (rdata->rbuf.buf) { |
| 159 | OPENSSL_free(rdata->rbuf.buf); | 159 | free(rdata->rbuf.buf); |
| 160 | } | 160 | } |
| 161 | OPENSSL_free(item->data); | 161 | free(item->data); |
| 162 | pitem_free(item); | 162 | pitem_free(item); |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | while ((item = pqueue_pop(s->d1->buffered_messages)) != NULL) { | 165 | while ((item = pqueue_pop(s->d1->buffered_messages)) != NULL) { |
| 166 | frag = (hm_fragment *)item->data; | 166 | frag = (hm_fragment *)item->data; |
| 167 | OPENSSL_free(frag->fragment); | 167 | free(frag->fragment); |
| 168 | OPENSSL_free(frag); | 168 | free(frag); |
| 169 | pitem_free(item); | 169 | pitem_free(item); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | while ((item = pqueue_pop(s->d1->sent_messages)) != NULL) { | 172 | while ((item = pqueue_pop(s->d1->sent_messages)) != NULL) { |
| 173 | frag = (hm_fragment *)item->data; | 173 | frag = (hm_fragment *)item->data; |
| 174 | OPENSSL_free(frag->fragment); | 174 | free(frag->fragment); |
| 175 | OPENSSL_free(frag); | 175 | free(frag); |
| 176 | pitem_free(item); | 176 | pitem_free(item); |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | while ((item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { | 179 | while ((item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { |
| 180 | frag = (hm_fragment *)item->data; | 180 | frag = (hm_fragment *)item->data; |
| 181 | OPENSSL_free(frag->fragment); | 181 | free(frag->fragment); |
| 182 | OPENSSL_free(frag); | 182 | free(frag); |
| 183 | pitem_free(item); | 183 | pitem_free(item); |
| 184 | } | 184 | } |
| 185 | } | 185 | } |
| @@ -197,7 +197,7 @@ dtls1_free(SSL *s) | |||
| 197 | pqueue_free(s->d1->sent_messages); | 197 | pqueue_free(s->d1->sent_messages); |
| 198 | pqueue_free(s->d1->buffered_app_data.q); | 198 | pqueue_free(s->d1->buffered_app_data.q); |
| 199 | 199 | ||
| 200 | OPENSSL_free(s->d1); | 200 | free(s->d1); |
| 201 | s->d1 = NULL; | 201 | s->d1 = NULL; |
| 202 | } | 202 | } |
| 203 | 203 | ||
