diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-11-13 05:07:01 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-11-13 05:07:01 +0000 |
commit | 7e73fb75989719299a7fdc67488457dd175f2012 (patch) | |
tree | 59cf1db86debd880c2cf7e9edf441fdef5f3b94d | |
parent | 868a373f915f65259c9708023ed612beb513db21 (diff) | |
parent | 610479fe408be9a3a714df8a650263fd7e0e36f0 (diff) | |
download | gnutls-7e73fb75989719299a7fdc67488457dd175f2012.tar.gz |
Merge branch 'tpm12_fix_memory_leak' into 'master'
tpm: Fix memory leak in encode_tpmkey_url
See merge request gnutls/gnutls!800
-rw-r--r-- | lib/tpm.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -839,16 +839,11 @@ static int randomize_uuid(TSS_UUID * uuid) static int encode_tpmkey_url(char **url, const TSS_UUID * uuid, TSS_FLAG storage) { - size_t size = (UUID_SIZE * 2 + 4) * 2 + 32; uint8_t u1[UUID_SIZE]; gnutls_buffer_st buf; gnutls_datum_t dret; int ret; - *url = gnutls_malloc(size); - if (*url == NULL) - return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); - _gnutls_buffer_init(&buf); memcpy(u1, &uuid->ulTimeLow, 4); |