From ea4554905e6d763bcde9b555e0c9544b4037e5de Mon Sep 17 00:00:00 2001 From: mlaurent Date: Fri, 7 Jan 2011 12:33:37 +0000 Subject: Fix mem leak git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork/krfb/libvncserver@1212554 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- vncauth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vncauth.c b/vncauth.c index 01bad00..6b3c730 100644 --- a/vncauth.c +++ b/vncauth.c @@ -118,10 +118,10 @@ rfbDecryptPasswdFromFile(char *fname) { FILE *fp; int i, ch; - unsigned char *passwd = (unsigned char *)malloc(9); - if ((fp = fopen(fname,"r")) == NULL) return NULL; + unsigned char *passwd = (unsigned char *)malloc(9); + for (i = 0; i < 8; i++) { ch = getc(fp); if (ch == EOF) { -- cgit v1.1