projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28a8a6f
)
Fixed memory leaks.
author
Armin Novak
<armin.novak@gmail.com>
Mon, 17 Nov 2014 00:07:07 +0000
(
01:07
+0100)
committer
Armin Novak
<armin.novak@gmail.com>
Mon, 17 Nov 2014 00:07:07 +0000
(
01:07
+0100)
libfreerdp/core/certificate.c
patch
|
blob
|
history
diff --git
a/libfreerdp/core/certificate.c
b/libfreerdp/core/certificate.c
index
7489857
..
b4ccd23
100644
(file)
--- a/
libfreerdp/core/certificate.c
+++ b/
libfreerdp/core/certificate.c
@@
-657,12
+657,12
@@
BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* serv
rdpRsaKey* key_new(const char* keyfile)
{
- BIO* bio;
- FILE* fp;
- RSA* rsa;
+ BIO* bio
= NULL
;
+ FILE* fp
= NULL
;
+ RSA* rsa
= NULL
;
int length;
- BYTE* buffer;
- rdpRsaKey* key;
+ BYTE* buffer
= NULL
;
+ rdpRsaKey* key
= NULL
;
key = (rdpRsaKey*) calloc(1, sizeof(rdpRsaKey));
@@
-752,6
+752,10
@@
out_free_modulus:
out_free_rsa:
RSA_free(rsa);
out_free:
+ if (fp)
+ fclose(fp);
+ if (buffer)
+ free(buffer);
free(key);
return NULL;
}