summaryrefslogtreecommitdiff
path: root/noncore/apps
authorerik <erik>2007-01-24 19:46:19 (UTC)
committer erik <erik>2007-01-24 19:46:19 (UTC)
commita017bf21dd89159052f2f7a3fbc043a24956c08c (patch) (unidiff)
tree008be2b62ee5487dc55b8a7c7f043c94268f8362 /noncore/apps
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/apps') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Bkmks.cpp1
-rw-r--r--noncore/apps/opie-sheet/Excel.cpp4
-rw-r--r--noncore/apps/zsafe/zsafe.cpp45
3 files changed, 27 insertions, 23 deletions
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp
index 00141a3..45aa045 100644
--- a/noncore/apps/opie-reader/Bkmks.cpp
+++ b/noncore/apps/opie-reader/Bkmks.cpp
@@ -345,2 +345,3 @@ Bkmk* BkmkFile::read05(BkmkFile* /*_this*/, FILE* f)
345 b = new Bkmk(nm,anno,pos); 345 b = new Bkmk(nm,anno,pos);
346 delete [] anno;
346 } 347 }
diff --git a/noncore/apps/opie-sheet/Excel.cpp b/noncore/apps/opie-sheet/Excel.cpp
index 51fe707..27080e9 100644
--- a/noncore/apps/opie-sheet/Excel.cpp
+++ b/noncore/apps/opie-sheet/Excel.cpp
@@ -379,3 +379,5 @@ char* ExcelBook::GetDataOfBREC(ExcelBREC* record)
379 { 379 {
380 ConvertCharToArray(record,Read(record->position,record->length),record->length); 380 char* readData = Read(record->position,record->length);
381 ConvertCharToArray(record,readData,record->length);
382 delete [] readData;
381 }; 383 };
diff --git a/noncore/apps/zsafe/zsafe.cpp b/noncore/apps/zsafe/zsafe.cpp
index f70f863..9c0c6ce 100644
--- a/noncore/apps/zsafe/zsafe.cpp
+++ b/noncore/apps/zsafe/zsafe.cpp
@@ -1774,4 +1774,6 @@ int ZSafe::loadInit(const char* _filename, const char *password)
1774 1774
1775 if (fd == NULL) 1775 if (fd == NULL) {
1776 delete krc2;
1776 return PWERR_OPEN; 1777 return PWERR_OPEN;
1778 }
1777 1779
@@ -1790,4 +1792,6 @@ int ZSafe::loadInit(const char* _filename, const char *password)
1790 1792
1791 if (size < 8) 1793 if (size < 8) {
1794 delete krc2;
1792 return PWERR_DATA; 1795 return PWERR_DATA;
1796 }
1793 1797
@@ -1811,2 +1815,3 @@ int ZSafe::loadInit(const char* _filename, const char *password)
1811 if (count2 == 0) { 1815 if (count2 == 0) {
1816 delete krc2;
1812 return PWERR_DATA; 1817 return PWERR_DATA;
@@ -1831,2 +1836,3 @@ int ZSafe::loadInit(const char* _filename, const char *password)
1831 } /* while ((count = read (fileno (fd), (unsigned char *) charbuf, 8)) > 0) */ 1836 } /* while ((count = read (fileno (fd), (unsigned char *) charbuf, 8)) > 0) */
1837 delete krc2;
1832 size -= buffer[size - 1]; 1838 size -= buffer[size - 1];
@@ -2101,17 +2107,2 @@ int ZSafe::saveInit(const char *_filename, const char *password)
2101 2107
2102 /* first we should check the permissions of the filename */
2103/*
2104 if (QFile::exists(_filename)) {
2105 val = checkFile(_filename);
2106 if (val != PWERR_GOOD)
2107 return val;
2108 } else
2109 {
2110 val = creat (_filename, (S_IRUSR | S_IWUSR));
2111 if (val == -1)
2112 return PWERR_OPEN;
2113 else
2114 close(val);
2115 }
2116*/
2117 QFileInfo f (_filename); 2108 QFileInfo f (_filename);
@@ -2121,4 +2112,6 @@ int ZSafe::saveInit(const char *_filename, const char *password)
2121 fd = fopen (_filename, "wb"); 2112 fd = fopen (_filename, "wb");
2122 if (fd == NULL) 2113 if (fd == NULL) {
2114 delete krc2;
2123 return PWERR_OPEN; 2115 return PWERR_OPEN;
2116 }
2124 2117
@@ -2132,2 +2125,3 @@ int ZSafe::saveInit(const char *_filename, const char *password)
2132 krc2->rc2_expandkey (key, keylength, 128); 2125 krc2->rc2_expandkey (key, keylength, 128);
2126 delete krc2;
2133 2127
@@ -2190,4 +2184,10 @@ int ZSafe::saveEntry(char *entry[FIELD_SIZE])
2190 bufferIndex = 0; 2184 bufferIndex = 0;
2191 if (putc ((unsigned char) (ciphertext[count3] >> 8), fd) == EOF) return PWERR_DATA; 2185 if (putc ((unsigned char) (ciphertext[count3] >> 8), fd) == EOF) {
2192 if (putc ((unsigned char) (ciphertext[count3] & 0xff), fd) == EOF) return PWERR_DATA; 2186 delete krc2;
2187 return PWERR_DATA;
2188 }
2189 if (putc ((unsigned char) (ciphertext[count3] & 0xff), fd) == EOF) {
2190 delete krc2;
2191 return PWERR_DATA;
2192 }
2193 } /*for (count3 = 0; count3 < 5; count3++)*/ 2193 } /*for (count3 = 0; count3 < 5; count3++)*/
@@ -2197,4 +2197,4 @@ int ZSafe::saveEntry(char *entry[FIELD_SIZE])
2197 } /*while (count2 < strlen (buffer))*/ 2197 } /*while (count2 < strlen (buffer))*/
2198 int ret = PWERR_GOOD; 2198 delete krc2;
2199 return ret; 2199 return PWERR_GOOD;
2200} 2200}
@@ -2230,2 +2230,3 @@ int ZSafe::saveFinalize(void)
2230 free(buffer); 2230 free(buffer);
2231 delete krc2;
2231 return retval; 2232 return retval;