projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f6f347
)
fix memory leak
author
Bodo Möller
<bodo@openssl.org>
Thu, 6 Jun 2002 10:33:05 +0000
(10:33 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Thu, 6 Jun 2002 10:33:05 +0000
(10:33 +0000)
Submitted by: Nils Larsch
crypto/ec/ec_print.c
patch
|
blob
|
history
diff --git
a/crypto/ec/ec_print.c
b/crypto/ec/ec_print.c
index 4b9b88266827664b5ecdf0d9319e05dae0cdb526..f7c8a303acafd15bc339419e91be5d63bd71a2de 100644
(file)
--- a/
crypto/ec/ec_print.c
+++ b/
crypto/ec/ec_print.c
@@
-139,7
+139,7
@@
char *EC_POINT_point2hex(const EC_GROUP *group,
{
char *ret, *p;
size_t buf_len=0,i;
- unsigned char *buf;
+ unsigned char *buf
, *pbuf
;
buf_len = EC_POINT_point2oct(group, point, form,
NULL, 0, ctx);
@@
-162,14
+162,17
@@
char *EC_POINT_point2hex(const EC_GROUP *group,
return NULL;
}
p = ret;
+ pbuf = buf;
for (i=buf_len; i > 0; i--)
{
- int v = (int) *(buf++);
+ int v = (int) *(
p
buf++);
*(p++)=HEX_DIGITS[v>>4];
*(p++)=HEX_DIGITS[v&0x0F];
}
*p='\0';
+ OPENSSL_free(buf);
+
return ret;
}