Commit ea455490 authored by mlaurent's avatar mlaurent

Fix mem leak


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork/krfb/libvncserver@1212554 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
parent 9d0ad6fd
...@@ -118,10 +118,10 @@ rfbDecryptPasswdFromFile(char *fname) ...@@ -118,10 +118,10 @@ rfbDecryptPasswdFromFile(char *fname)
{ {
FILE *fp; FILE *fp;
int i, ch; int i, ch;
unsigned char *passwd = (unsigned char *)malloc(9);
if ((fp = fopen(fname,"r")) == NULL) return NULL; if ((fp = fopen(fname,"r")) == NULL) return NULL;
unsigned char *passwd = (unsigned char *)malloc(9);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
ch = getc(fp); ch = getc(fp);
if (ch == EOF) { if (ch == EOF) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment