summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlaurent <mlaurent@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 12:33:37 +0000
committermlaurent <mlaurent@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 12:33:37 +0000
commitea4554905e6d763bcde9b555e0c9544b4037e5de (patch)
tree6a9c4ab79ca2a139d3563b5c8cb882b824d0e223
parent9d0ad6fd0a3e2ba748b7b81f5031d6170c8bc026 (diff)
downloadlibvncserver-krfb.zip
libvncserver-krfb.tar.gz
Fix mem leakkrfb
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork/krfb/libvncserver@1212554 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--vncauth.c4
1 files 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) {
OpenPOWER on IntegriCloud