projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be464e5
)
eet: handling memory leak on realloc fail.
author
Srivardhan Hebbar
<sri.hebbar@samsung.com>
Wed, 21 Oct 2015 20:50:17 +0000
(13:50 -0700)
committer
Cedric BAIL
<cedric@osg.samsung.com>
Wed, 21 Oct 2015 20:51:34 +0000
(13:51 -0700)
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3207
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/eet/eet_cipher.c
patch
|
blob
|
history
diff --git
a/src/lib/eet/eet_cipher.c
b/src/lib/eet/eet_cipher.c
index
6ccb9cc
..
9bff406
100644
(file)
--- a/
src/lib/eet/eet_cipher.c
+++ b/
src/lib/eet/eet_cipher.c
@@
-314,9
+314,12
@@
eet_identity_print(Eet_Key *key,
while ((err = gnutls_hex_encode(rsa_raw + i, res, &size)) ==
GNUTLS_E_SHORT_MEMORY_BUFFER)
{
+ char *temp;
+
size += 128;
- if (!(
res
= realloc(res, size)))
+ if (!(
temp
= realloc(res, size)))
goto on_error;
+ res = temp;
}
if (err)
goto on_error;