summaryrefslogtreecommitdiff
path: root/noncore/comm
authorerik <erik>2007-01-24 19:46:19 (UTC)
committer erik <erik>2007-01-24 19:46:19 (UTC)
commita017bf21dd89159052f2f7a3fbc043a24956c08c (patch) (unidiff)
tree008be2b62ee5487dc55b8a7c7f043c94268f8362 /noncore/comm
parenta4a7bd22feb060a80e20c81cded43cc24f5cd423 (diff)
downloadopie-a017bf21dd89159052f2f7a3fbc043a24956c08c.zip
opie-a017bf21dd89159052f2f7a3fbc043a24956c08c.tar.gz
opie-a017bf21dd89159052f2f7a3fbc043a24956c08c.tar.bz2
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.
Diffstat (limited to 'noncore/comm') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/vncauth.c6
1 files changed, 5 insertions, 1 deletions
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)
94 int i, ch; 94 int i, ch;
95 unsigned char *passwd = (unsigned char *)malloc(9); 95 unsigned char *passwd = (unsigned char *)malloc(9);
96 96
97 if ((fp = fopen(fname,"r")) == NULL) return NULL; 97 if ((fp = fopen(fname,"r")) == NULL) {
98 free(passwd);
99 return NULL;
100 }
98 101
99 for (i = 0; i < 8; i++) { 102 for (i = 0; i < 8; i++) {
100 ch = getc(fp); 103 ch = getc(fp);
101 if (ch == EOF) { 104 if (ch == EOF) {
102 fclose(fp); 105 fclose(fp);
106 free(passwd);
103 return NULL; 107 return NULL;
104 } 108 }
105 passwd[i] = ch; 109 passwd[i] = ch;