projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f54458a
)
librfb: don't leak password on error
author
Stefan Kost
<ensonic@users.sf.net>
Thu, 19 May 2011 21:16:00 +0000
(
00:16
+0300)
committer
Stefan Kost
<ensonic@users.sf.net>
Thu, 19 May 2011 21:16:00 +0000
(
00:16
+0300)
gst/librfb/vncauth.c
patch
|
blob
|
history
diff --git
a/gst/librfb/vncauth.c
b/gst/librfb/vncauth.c
index
d6ce7e4
..
dc68173
100644
(file)
--- a/
gst/librfb/vncauth.c
+++ b/
gst/librfb/vncauth.c
@@
-96,15
+96,18
@@
vncDecryptPasswdFromFile (char *fname)
{
FILE *fp;
int32_t i, ch;
- unsigned char *passwd
= (unsigned char *) malloc (9)
;
+ unsigned char *passwd;
if ((fp = fopen (fname, "r")) == NULL)
return NULL;
+ passwd = (unsigned char *) malloc (9);
+
for (i = 0; i < 8; i++) {
ch = getc (fp);
if (ch == EOF) {
fclose (fp);
+ free (passwd);
return NULL;
}
passwd[i] = ch;