summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/eet/eet_cipher.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c
index 6ccb9cc48c..9bff406713 100644
--- a/src/lib/eet/eet_cipher.c
+++ b/src/lib/eet/eet_cipher.c
@@ -314,9 +314,12 @@ eet_identity_print(Eet_Key *key,
314 while ((err = gnutls_hex_encode(rsa_raw + i, res, &size)) == 314 while ((err = gnutls_hex_encode(rsa_raw + i, res, &size)) ==
315 GNUTLS_E_SHORT_MEMORY_BUFFER) 315 GNUTLS_E_SHORT_MEMORY_BUFFER)
316 { 316 {
317 char *temp;
318
317 size += 128; 319 size += 128;
318 if (!(res = realloc(res, size))) 320 if (!(temp = realloc(res, size)))
319 goto on_error; 321 goto on_error;
322 res = temp;
320 } 323 }
321 if (err) 324 if (err)
322 goto on_error; 325 goto on_error;