From a017bf21dd89159052f2f7a3fbc043a24956c08c Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 24 Jan 2007 19:46:19 +0000 Subject: Every file in this commit has a memory leak of some kind or another. I think all of them are minor and should not effect properly running code. But if I were you I would give libstocks and the stockticker plugin in Today a wide berth. That library is atrocious. --- (limited to 'noncore/comm') diff --git a/noncore/comm/keypebble/vncauth.c b/noncore/comm/keypebble/vncauth.c index 277d145..7de837a 100644 --- a/noncore/comm/keypebble/vncauth.c +++ b/noncore/comm/keypebble/vncauth.c @@ -94,12 +94,16 @@ vncDecryptPasswdFromFile(char *fname) int i, ch; unsigned char *passwd = (unsigned char *)malloc(9); - if ((fp = fopen(fname,"r")) == NULL) return NULL; + if ((fp = fopen(fname,"r")) == NULL) { + free(passwd); + return NULL; + } for (i = 0; i < 8; i++) { ch = getc(fp); if (ch == EOF) { fclose(fp); + free(passwd); return NULL; } passwd[i] = ch; -- cgit v0.9.0.2