Daniel Marjamäki
80069f016e
Fixed #2065 (false positive: memory leak)
2010-09-27 17:53:10 +02:00
Pete Johns
6a52538a9a
Fixed #1949 : assert() hides memory leaks
...
Added separate unit-test (trac1949), initially broken to highlight the error and added "assert" to call_func_white_list.
Left TestMemleakInFunction::call_func() as is, as this wouldn't highlight the actual problem.
2010-09-27 20:25:34 +10:00
Daniel Marjamäki
78bd66cd5c
Fixed #2056 (False positive: Resource leak)
2010-09-19 12:16:29 +02:00
Daniel Marjamäki
84d9282da2
Memory leaks: remove redundant 'if return ; else|'
2010-09-12 21:41:13 +02:00
Daniel Marjamäki
5a95303405
Memory leaks: reduce 'loop { if continue ;' to 'loop {'
2010-09-12 21:15:19 +02:00
Daniel Marjamäki
9c4a05a3bd
Memory leaks: simplify 'loop { use ; callfunc ; }' to 'use ;'
2010-09-12 20:45:30 +02:00
Daniel Marjamäki
ceeef847ef
Memory leaks: simplify 'if break ; break ;'
2010-09-11 21:48:40 +02:00
Daniel Marjamäki
7aa0504692
Memory leaks: simplify 'use use'
2010-09-11 21:32:21 +02:00
Daniel Marjamäki
d4e045cee5
Memory leaks: fixed try/catch and nested loops simplifications
2010-09-11 21:07:35 +02:00
Daniel Marjamäki
4064712baa
Memory leaks: improved simplification for 'callfunc'
2010-09-11 20:49:24 +02:00
Daniel Marjamäki
73122c3e8a
Memory leaks: Improved the simplifycode for 'use ; if| use ;'
2010-09-11 20:18:16 +02:00
Daniel Marjamäki
ecd863700e
Fixed #2023 (false positive with realloc())
2010-09-11 11:15:04 +02:00
Daniel Marjamäki
80be31de13
Fixed #2037 (memleak not detected in exit path when variable used)
2010-09-08 20:03:22 +02:00
Daniel Marjamäki
8e746ca53f
CheckMemoryleaks: reduce 'use ; if return ; dealloc ;' to 'if return ; dealloc ;'. ticket: #2037
2010-09-08 19:22:03 +02:00
Daniel Marjamäki
fb4fce466e
Fixed #2014 (False positive with longjmp)
2010-09-03 07:18:01 +02:00
Daniel Marjamäki
d45186d645
Added --debug-warnings that we can use to enable various debug warnings
2010-08-27 20:28:00 +02:00
Daniel Marjamäki
ca407110dc
Fixed #1936 (Internal error. Token::Match called with varid 0.)
2010-08-24 20:58:22 +02:00
Daniel Marjamäki
eedb5e383e
Memory leaks: better handling of 'return strcmp(..' etc
2010-08-05 21:23:32 +02:00
Daniel Marjamäki
e5a2c6426b
Memory leaks: Added ASSERT_EQUALS near the TODO_ASSERT_EQUALS
2010-08-05 13:30:07 +02:00
Daniel Marjamäki
9d24c9ceaa
Memory leaks: refactoring return handling
2010-08-04 23:01:32 +02:00
Daniel Marjamäki
6d94c4f15e
Memory leaks: don't translate 'return p[10];' to 'return use ;'
2010-08-04 20:48:20 +02:00
Daniel Marjamäki
6700351ede
Fixed #1833 (memory leak detected in version 1.37 not detected in 1.43)
2010-08-02 23:04:23 +02:00
Daniel Marjamäki
ff9d3d0965
memory leaks: better handling of 'loop { dealloc ; alloc ; }'
2010-08-02 22:17:09 +02:00
Daniel Marjamäki
ae0252dc91
memory leaks: simplify 'callfunc ; ;'
2010-08-02 21:59:47 +02:00
Daniel Marjamäki
df44703ee9
memory leaks: better checking of function calls. If there are statements after the function call it is unlikely the function call is noreturn
2010-08-02 21:56:50 +02:00
Daniel Marjamäki
694325d51f
Fixed #1912 (False positive: memory leak (calling noreturn function))
2010-07-30 08:50:10 +02:00
Zachary Blair
9f44d9eb62
Fixed #1889 (false positive: Common realloc mistake)
2010-07-26 23:17:27 -07:00
Zachary Blair
9ffd06ff5e
Fixed #1856 (false positive: "pData" nulled but not freed upon failure)
2010-07-18 23:55:39 -07:00
Martin Ettl
5ab36d8a6d
added a testcase for ticket #1879
2010-07-18 15:13:48 +02:00
Daniel Marjamäki
49626e427e
Realloc: changed the error message. I think it's better to mention realloc in the message.
2010-07-07 20:28:15 +02:00
Daniel Marjamäki
dc2a0a6468
Fixed #1789 (false positive: memory leak (reallocation in subfunction through parameter))
2010-07-06 21:36:50 +02:00
Daniel Marjamäki
ae3557fa92
Fixed #1820 (False positive: memory leak (auto deallocated class))
2010-07-05 14:01:25 +02:00
Daniel Marjamäki
3205775eb9
Fixed #1790 (mismatching allocation/deallocation false positive)
2010-06-30 09:21:15 +02:00
Daniel Marjamäki
d22da6088c
Fixed #1800 (false positive: memory leak when ptr used as map key)
2010-06-21 18:43:28 +02:00
Leandro Lisboa Penz
ad4681223b
Ticket #1789 is not really fixed; added TODO.
2010-06-16 22:47:05 -03:00
Leandro Lisboa Penz
350810e3c1
Improved test of pointer argument realloc.
2010-06-16 22:46:47 -03:00
Leandro Lisboa Penz
58a872e6a0
Fixed #1789 (false positive: memory leak (reallocation in subfunction through parameter))
...
Detecting reallocations in the other function.
2010-06-16 22:29:55 -03:00
Daniel Marjamäki
8a6f4254e0
Fixed #853 (False positive: memory leak for member variable with unknown function)
2010-06-16 19:28:47 +02:00
Daniel Marjamäki
e987d2e05b
Memory leaks: more specific bailouts to reduce false negatives
2010-06-13 19:00:11 +02:00
Daniel Marjamäki
37ade20dad
Added testcase for #1557 (false positive: memory leak)
2010-06-13 10:43:23 +02:00
Daniel Marjamäki
76221c0916
Fixed #1510 (false positive '(possible error) Memory leak' when 'a = b = new ...; delete a' (but not b))
2010-06-12 13:37:44 +02:00
Daniel Marjamäki
3a4a151cc4
reverted 'added a todo testcase for ticket #1788 '
2010-06-12 08:36:10 +02:00
Martin Ettl
69ecc24bf5
added a few testcases for checking memory leaks in classes
2010-06-11 13:33:10 +02:00
Martin Ettl
81828742ac
added a todo testcase for ticket #1788
2010-06-11 13:23:10 +02:00
Martin Ettl
be9c23cb1a
added todo-testcase for ticket #1401
2010-06-10 22:49:34 +02:00
Daniel Marjamäki
e140ff6e84
Memory leaks: skipping function call inside allocation
2010-06-06 11:22:59 +02:00
Daniel Marjamäki
a9196e8710
Memory leaks: Added allocation function 'g_strdup_printf'
2010-06-06 11:09:19 +02:00
Leandro Lisboa Penz
4ac7da7d51
Fixed #73 (memory leaks not found when calling a function that returns allocated memory through a parameter)
2010-06-04 20:58:50 -03:00
Daniel Marjamäki
45821b3871
Fixed #1719 (False negative: memory leak (fgets in condition))
2010-05-31 18:20:34 +02:00
Daniel Marjamäki
9b1ed1112b
Memory leaks: Fixed bug in CheckMemoryLeak::functionReturnType
2010-05-30 20:30:08 +02:00
Daniel Marjamäki
0c6352a826
Memory leaks: small fixes. add checking of 'g_fopen'. don't let 'fclose' calls be interpreted as 'callfunc'
2010-05-29 21:56:18 +02:00
Daniel Marjamäki
495dfde32c
Fixed #1716 (Wrong reporting of leak with close() in a while loop condition)
2010-05-29 21:11:59 +02:00
Daniel Marjamäki
24703418bd
Fixed #1715 (switch with fallthrough and 'return' confuses cppcheck)
2010-05-29 20:55:09 +02:00
Daniel Marjamäki
b702b8542d
Memory leaks: enabled the leaks checking when members are not deallocated in the destructor. This checking was previously an --all check so there could be false positives.
2010-05-29 19:29:59 +02:00
Daniel Marjamäki
5692e7a6f6
Fixed #1707 (false positive: Memory leak)
2010-05-24 19:28:27 +02:00
Zachary Blair
1539c0b3d2
Fixed #1649 (add a warning for potential memory leaks when using realloc)
2010-05-17 22:46:48 -07:00
Daniel Marjamäki
d0e122079f
Refactoring: Removed possibleError messages from CheckMemoryLeaks
2010-05-16 19:55:16 +02:00
Daniel Marjamki
d7b117402c
Code cleanup: Removed autodealloc handling
2010-05-16 07:15:31 +02:00
Daniel Marjamki
70d20ac544
Fixed #1681 (false negative: memory leak in operator =)
2010-05-15 19:40:32 +02:00
Daniel Marjamäki
5d01047ae4
Fixed #1665 ('If you see this, there is a bug': Token::Match('%var% ( %varid% [,)]', 0))
2010-05-10 18:11:02 +02:00
Daniel Marjamäki
d7118c4d36
Fixed #1648 (mismatch allocate and deallocate calls.)
2010-05-09 13:46:13 +02:00
Daniel Marjamäki
d3b5c30c6c
Fixed #1628 (false negative: memory leak when using redundant braces)
2010-04-27 20:43:31 +02:00
Daniel Marjamäki
e068979d62
Fixed #1440 (false negative: memory leak (function parameters))
2010-04-24 22:24:03 +02:00
Daniel Marjamäki
5e5b8d3861
Fixed #1146 (improve check: memory leak not detected (allocation in subfunction))
2010-04-24 20:40:57 +02:00
Reijo Tomperi
b11fc0a069
Fix one compiler warning
2010-04-18 22:14:25 +03:00
Daniel Marjamäki
c0e9a546f7
Refactoring: Refactoring the Settings class
2010-04-17 09:23:54 +02:00
Reijo Tomperi
35d2a27b9c
Update copyright year in all source files
2010-04-13 22:23:17 +03:00
Daniel Marjamäki
e9b4ea44a2
Refactoring: Disable inconclusive checks. They can still be activated for debugging/testing purposes
2010-04-10 14:05:33 +02:00
Reijo Tomperi
6dc3860ae9
Fix more -Wshadow compile warnings
2010-04-09 22:40:37 +03:00
Daniel Marjamäki
0cad22314e
Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup.
2010-04-02 07:30:58 +02:00
Martin Ettl
193aa7d1d3
astyle fix
2010-04-02 02:21:53 +02:00
Daniel Marjamäki
54c5d53eac
Fixed #1428 (False positive: (possible error) Memory leak when memory deleted in destructor)
2010-03-19 16:57:23 +01:00
Daniel Marjamäki
2441a79c7b
unit testing: use const_cast instead of defines
2010-03-17 21:58:53 +01:00
Daniel Marjamäki
65ae37de2f
Fixed #1460 (false positive: memory leak when using throw no_memory)
2010-03-13 17:11:48 +01:00
Daniel Marjamäki
a6c9a6fc54
Fixed #1407 (false positive memory leak when returning pointer to the allocated memory)
2010-02-20 10:17:45 +01:00
Daniel Marjamäki
e1b54df368
Fixed #1346 (False positive: Memory leak when allocated memory is stored elsewhere inside a condition)
2010-02-06 22:35:36 +01:00
Daniel Marjamäki
71117378ef
Fixed #1363 (false positive: memory leak)
2010-02-06 21:47:52 +01:00
Daniel Marjamäki
9d11492845
Fixed #1286 (Memory leak not detected)
2010-01-27 22:05:04 +01:00
Daniel Marjamäki
e49f7bfa0e
Fixed #1315 (mismatched allocation and deallocaton not detected)
2010-01-27 21:02:13 +01:00
Daniel Marjamäki
fa305d70bc
Fixed #1302 (False positive: Confusion between POSIX open() and class member)
2010-01-26 20:10:52 +01:00
Daniel Marjamäki
724c55b32a
Memory leaks: some refactorings and minor improvements
2010-01-24 21:48:39 +01:00
Daniel Marjamäki
a6e81c2ee7
Fixed #1293 (Things to add to call_func_white_list)
2010-01-20 22:03:06 +01:00
Daniel Marjamäki
85fcd4c9a9
Fixed #1282 (False positive for a memory leak in a simple loop)
2010-01-19 19:08:03 +01:00
Daniel Marjamäki
f49cc7f0ff
CheckMemoryLeak: Added 'scanf' and 'sscanf' to the whitelist
2010-01-18 21:58:27 +01:00
Daniel Marjamäki
32604dd55e
Fixed #1266 ('qsort' missing in call_func_white_list)
2010-01-18 21:34:11 +01:00
Daniel Marjamäki
ac077d3160
Fixed #1264 (False positive: Resource leak with if-else in while)
2010-01-14 21:41:50 +01:00
Daniel Marjamäki
814eb6caee
Fixed #1257 (potential leaks not reported becauseof 'continue' in loop)
2010-01-12 19:12:08 +01:00
Daniel Marjamäki
3fb420cbf0
fixed unlogged errors from the tokenizer and also some errors reported by valgrind
2010-01-10 20:03:46 +01:00
Daniel Marjamäki
a50ec2eded
memory leaks: better handling of loops and switch
2010-01-10 15:40:50 +01:00
Daniel Marjamäki
f65bf6d565
Fixed #1220 (False memory leak when using while)
2010-01-10 14:00:32 +01:00
Daniel Marjamäki
3fabe53570
Memory leaks: Better handling of switch
2010-01-10 10:37:54 +01:00
Daniel Marjamäki
686137415f
Fixed #1235 (CheckMemoryLeakInFunction: Wrong handling of 'fcloseall')
2010-01-07 21:36:51 +01:00
Daniel Marjamäki
6c0919d9bd
Fixed #1173 (Improve check: memory leak not detected in constructor)
2009-12-30 21:29:54 +01:00
Daniel Marjamäki
afad0205c4
Fixed #1120 (Test compile warnings with Cygwin)
2009-12-26 17:49:05 +01:00
Daniel Marjamäki
aaf908bd5e
astyle formatting
2009-12-22 19:18:02 +01:00
Daniel Marjamäki
b4b63789fc
Eric Sesterhenn: Fixed #1131 (descriptor leak false positive)
2009-12-22 19:13:46 +01:00
Daniel Marjamäki
11c7b8a839
Execution Path: some refactorings of the checking
2009-12-20 19:44:32 +01:00
Daniel Marjamäki
368df4c083
TestLocalLeaks: going out of scope
2009-12-15 19:27:07 +01:00
Daniel Marjamäki
0c13f9ba5c
Added TestLocalLeaks
2009-12-14 20:30:31 +01:00
Daniel Marjamäki
4dc8794c69
Fixed #1082 (False positive: Resource leak in loop which exits only after releasing resource)
2009-12-13 19:50:49 +01:00
Daniel Marjamäki
48bb1fdc83
Eric Sesterhenn: Fixed #1032 (False positive resource leak with exit at end of function)
2009-12-03 19:19:20 +01:00
Daniel Marjamäki
153a13272c
ericsesterhenn: Fix #1028 (False positive resource leak)
2009-11-30 16:45:19 +01:00
Daniel Marjamäki
42ffea4f16
Fixed #968 (False positive when TEMP_FAILURE_RETRY used)
2009-11-18 17:17:37 +01:00
Daniel Marjamäki
b5cbc509f3
Fixed #483 (False positive: found leak when foreach for lists used)
2009-11-15 10:30:00 +01:00
Daniel Marjamäki
14fd0154d2
memory leaks: simple code cleanup
2009-11-15 09:53:38 +01:00
Daniel Marjamäki
fee96f3cd6
Fixed #944 (new false positives against Wine Git Tree)
2009-11-14 09:06:28 +01:00
Daniel Marjamäki
1187587521
Fixed #919 (possible memory leak not detected)
2009-11-13 20:22:28 +01:00
Daniel Marjamäki
0682db47a7
Memory leaks: Detect simple leak
2009-10-27 23:08:11 +01:00
Daniel Marjamäki
45b0758e71
Fixed #860 (Improve double delete detection)
2009-10-27 21:28:03 +01:00
Daniel Marjamäki
09859c1019
refactoring the folder structure
2009-10-25 12:49:06 +01:00
Daniel Marjamäki
26a81e82cc
Fixed #253 (MemoryLeakInClass: False positive when memory is released in function, which is called from destructor)
2009-10-24 15:07:14 +02:00
Daniel Marjamäki
2c8a418c7e
Memory leaks: Added and fixed testcase TestMemleakInClass::class13
2009-10-23 20:04:47 +02:00
Daniel Marjamäki
701d622ff0
Fixed #428 (Memory leak not detected with class)
2009-10-22 21:51:58 +02:00
Daniel Marjamäki
58790eda82
Fixed #449 (false postive:: resource leak when using errno)
2009-10-18 13:17:05 +02:00
Daniel Marjamäki
ed3860a0a7
Fixed #805 (False positive: Member functions not handled correctly)
2009-10-12 21:36:28 +02:00
Reijo Tomperi
ab762b1a00
Fix #388 (resource leak not detected, allocation through function call)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/388
2009-10-06 23:14:32 +03:00
Daniel Marjamäki
36fb24b1a5
memory leaks: don't write errors for static member variables
2009-10-06 18:25:00 +02:00
Daniel Marjamäki
23d8937661
Fixed #789 (false positive: resource leak reported when using for loop)
2009-10-04 19:58:41 +02:00
Daniel Marjamäki
6b1fae75e5
Fixed #785 (False positive: resource leak of extern FILE*)
2009-10-04 14:24:41 +02:00
Daniel Marjamäki
af5a695f82
Fixed #727 (False positive: Resource leak when release is done inside function call)
2009-10-04 13:10:08 +02:00
Daniel Marjamäki
4387071eb1
Fixed #733 (New check: locking & unlocking mutex and semaphore variables)
2009-10-03 21:46:22 +02:00
Daniel Marjamäki
57067f6627
memory leaks: refactoring unit tests
2009-10-01 22:25:59 +02:00
Reijo Tomperi
b3ad712b61
Fix #421 (Memory leak not found when typeid() is used.)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/421
2009-10-01 11:56:59 +03:00
Daniel Marjamäki
e3e8224b4e
memory leaks: fixed TODO_ASSERT_EQUALS
2009-09-30 22:27:00 +02:00
Reijo Tomperi
f9871c2d54
Fix #745 (false positive: possible null pointer dereference , while)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/745
2009-09-30 21:42:14 +03:00
Daniel Marjamäki
311f6dc92e
Fixed #746 (False positive, Memory leak when goto is used)
2009-09-28 22:58:06 +02:00
Daniel Marjamäki
1427f0a2c7
memory leaks: fixed a TODO_ASSERT_EQUALS for a false positive
2009-09-28 22:41:45 +02:00
Daniel Marjamäki
a61abcbbc8
Fixed #728 (False positive, resource leak, when released in a loop)
2009-09-27 21:49:07 +02:00
Reijo Tomperi
fdde2182b9
Fix GPL comments in all files. ">." was missing from the end.
2009-09-27 18:08:31 +03:00
Daniel Marjamäki
482a2f9d95
Fixed #718 (False positive, resource leak when break in a loop before exit)
2009-09-26 07:19:22 +02:00
Daniel Marjamäki
6db95cd01c
Memory leaks: Added a TODO assertion for a false positive
2009-09-25 22:01:54 +02:00
Daniel Marjamäki
cd94d50526
Memory leaks: fixed a TODO_ASSERT_EQUALS
2009-09-24 22:40:18 +02:00
Daniel Marjamäki
fa4e0a617e
Fixed #700 (False positive: Memory leak)
2009-09-23 22:42:07 +02:00
Daniel Marjamäki
ad92aa4c20
Fixed #715 (False positive: Resource leak when exit() after if loop)
2009-09-22 18:09:29 +02:00
Reijo Tomperi
661e4504cb
astyle fix
2009-09-19 14:21:50 +03:00
Daniel Marjamäki
8f96c1992a
Fixed #688 (False positive in error category when --all is used)
2009-09-19 08:23:10 +02:00
Daniel Marjamäki
5efedf85d6
Fixed #671 (False positive. Leak when loop is before exit)
2009-09-15 22:26:38 +02:00
Daniel Marjamäki
1d974f7c05
memory leaks: added test assertion. simplify ';alloc;exit;' to ';exit;'
2009-09-13 07:20:42 +02:00
Daniel Marjamäki
5df28c51c6
memory leaks: minor refactorings
2009-09-12 21:13:47 +02:00
Daniel Marjamäki
ab4a7fdef2
Fixed #518 (False positive for leaks when function from err()-family used)
2009-09-12 14:11:17 +02:00
Daniel Marjamäki
333c6d9e0a
memory leaks: Added a todo test case for the getcode function
2009-09-04 19:11:19 +02:00
Daniel Marjamäki
93659bbe08
memory leaks: fixed a todo testcase to find more leaks
2009-09-01 20:12:53 +02:00
Daniel Marjamäki
9a47b7110e
memory leaks: fixed todo testcases to find more memory leaks
2009-09-01 20:02:28 +02:00
Slava Semushin
0ec848b1fa
test/testmemleak.cpp(dofindleak): provide settings object with debug enabled.
...
This allows to print tokens when syntax error found in one of tests.
2009-09-02 00:38:35 +07:00
Daniel Marjamäki
7ba244cf45
Memory leaks: fixed a todo testcase
2009-09-01 19:33:17 +02:00
Daniel Marjamäki
59a4a36fe1
memory leaks: minor fix for testcase
2009-09-01 19:06:34 +02:00
Reijo Tomperi
67a8a3225c
astyle fix
2009-08-30 23:07:37 +03:00
Daniel Marjamäki
960fb861da
Refactoring: Refactoring of the unit testing for the CheckMemoryLeakInFunction
2009-08-30 21:11:15 +02:00
Daniel Marjamäki
9d7defad22
Fixed #615 (Memleak was detected in 1.32 but not in 1.33 and later)
2009-08-29 17:33:57 +02:00
Daniel Marjamäki
1dd2ec4757
Fixed #414 (memory leak in if-else construct not detected)
2009-08-29 16:55:43 +02:00
Daniel Marjamäki
270d2b2d4f
memory leaks: improved the simplification of 'if* ;'
2009-08-29 16:27:16 +02:00
Daniel Marjamäki
8f1f89ae2b
memory leaks: fixed todo test case. reduce exit better
2009-08-29 16:03:23 +02:00
Daniel Marjamäki
6347d0e976
memory leaks: better handling of open/close
2009-08-29 09:18:21 +02:00
Daniel Marjamäki
88d0bd3908
astyle
2009-08-29 08:20:18 +02:00
Daniel Marjamäki
ee5b2a43c7
Fixed #627 (False positive with --all, Resource leak with open())
2009-08-29 07:43:44 +02:00
Daniel Marjamäki
de9e62e90a
Memory leaks: handling asprintf better
2009-08-29 07:26:32 +02:00
Daniel Marjamäki
406fdd3219
Memory leaks: Fixed two todo testcases (getcode handling of asprintf)
2009-08-29 07:02:36 +02:00
Daniel Marjamäki
ab047c680c
memory leaks: fixed a todo testcase
2009-08-29 06:42:24 +02:00
Daniel Marjamäki
74fd052fc0
Memory leaks: Testing that asprintf is handled correctly
2009-08-28 23:26:40 +02:00
Reijo Tomperi
e3c1e14bb0
astyle fix
2009-08-26 00:41:03 +03:00
Daniel Marjamäki
d67e3fcc49
Refactoring the unit tests of TestMemleakInFunction
2009-08-25 22:18:22 +02:00
Daniel Marjamäki
c25e1963b1
Fixed #498 (Tokenizer: simplify 'goto')
2009-08-24 23:10:12 +02:00
Daniel Marjamäki
9da2ecf4f4
Refactoring the unit testing. Wrote special tests for CheckMemoryLeakInFunction::findleak
2009-08-23 15:48:25 +02:00
Daniel Marjamäki
0da25081d5
refactoring: began refactoring the unit testing for CheckMemoryLeakInFunction. More specific testing of the functions getcode, simplifycode, call_func, etc
2009-08-23 11:26:17 +02:00
Daniel Marjamäki
8b46172bcf
Memory leaks: Use varid instead of varname
2009-08-19 19:42:07 +02:00
Daniel Marjamäki
85682ed429
Fixed #591 (False positive: Deallocating a deallocated pointer)
2009-08-18 20:49:08 +02:00
danmar
3de825c290
Borland C++ Builder: Fixed compilation and testrunner problems
2009-08-13 22:13:52 +02:00
Daniel Marjamäki
ecdbcbce3d
Fixed #566 (False positive when assigning the return value of realloc(NULL,..) to a pointer variable holding a freed memory address)
2009-08-10 22:04:28 +02:00
Daniel Marjamäki
ce8c5b0236
Fixed #555 (False positive: [CuTest.c:25]: (error) Memory leak: len)
2009-08-05 21:18:16 +02:00
Daniel Marjamäki
9e348ca739
Fixed #554 (resource leak false positive)
2009-08-04 21:34:14 +02:00
Daniel Marjamäki
706ba34a6d
Refactoring the unit testing
2009-08-04 21:32:14 +02:00
Reijo Tomperi
769119c725
Fix ticket #552 (False positive with --all when realloc is used with two variables.)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/552
2009-08-02 23:30:43 +03:00
Reijo Tomperi
10f6678cf9
TODO test case realloc5 added and "Checkmemoryleak: simplifycode result for" debug info added.
2009-08-02 22:23:47 +03:00
Daniel Marjamäki
b7ffcf53ba
Fixed #511 (false positive, memory leak when using 'var = ({});')
2009-07-31 23:42:21 +02:00
Daniel Marjamäki
050b85c5eb
memory leak for struct member: fixed false positive when the struct pointer is stored away
2009-07-29 11:38:20 +02:00
Daniel Marjamäki
6bb85703f6
memory leaks: fixed false positive for struct members - better handling of if/else
2009-07-24 09:05:40 +02:00
Daniel Marjamäki
73c028bdb7
memory leaks: added a todo test case for struct members when using if-else
2009-07-23 22:29:31 +02:00
Daniel Marjamäki
565ac2fca6
Fixed #493 (Memory leak: False positive when using the exit(0))
2009-07-23 16:30:30 +02:00
Daniel Marjamäki
3243933c90
Fixed #494 (False positives of checking leaks struct members)
...
Better handling of function calls
2009-07-22 08:30:51 +02:00
Daniel Marjamäki
6f646246ee
dereferencing deallocated memory: it is ok to take the address to deallocated memory but it is not ok to dereference the address
2009-07-21 13:04:13 +02:00
Daniel Marjamäki
74699cab66
memory leak for struct member: made the checking more sensitive. Skip bail-out execution paths were the member is properly deallocated
2009-07-20 14:39:24 +02:00
Daniel Marjamäki
ddaea3244d
memleak: implemented simple checking for leaking struct members
2009-07-19 16:51:31 +02:00
Daniel Marjamäki
ffac9281c4
astyle formatting
2009-07-18 20:35:22 +02:00
Slava Semushin
2ba0897ecb
src/checkmemoryleak.cpp: added fchmod() function to white list.
2009-07-18 23:48:48 +07:00
Slava Semushin
a0a526a205
Fixed ticket #464 (resource leak not detected when getc is used on the file handle)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/464
2009-07-18 18:32:55 +07:00
Daniel Marjamäki
7d35447d80
refactoring: renamed the severity "all" to "possible error"
2009-07-13 10:16:31 +02:00
Daniel Marjamäki
2a02041fd8
memleak: fixed todo test case
2009-07-07 15:22:37 +02:00
Daniel Marjamäki
7b2f6b6173
addon to previous commit - changed ASSERT_EQUALS to TODO_ASSERT_EQUALS for the todo test case
2009-07-06 12:38:04 +02:00
Daniel Marjamäki
5efb834f36
Memory leaks: Added a simple todo test case
2009-07-06 12:33:31 +02:00
Daniel Marjamäki
9beb73824b
Fixed #446 (memory leak false positive when variable is static)
2009-07-06 12:20:13 +02:00
Reijo Tomperi
f676deb208
Test case improvement, unused function removed from tokenizer.
2009-07-05 22:37:53 +03:00
Daniel Marjamäki
13ca5f89be
added test case
2009-06-23 18:29:43 +02:00
Slava Semushin
13e805f332
Fixed ticket #399 (Add detection for resource leaks after open() usage)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/399
2009-06-21 22:01:43 +07:00
Daniel Marjamäki
8715ba1458
CheckMemoryLeakInFunction: More sensitive checking when the code calls an unknown function
2009-06-21 14:12:59 +02:00
Daniel Marjamäki
f28dec1f5a
detect memory leak when all is given when calling an unknown function
2009-06-21 13:48:39 +02:00
Daniel Marjamäki
453a5cdd47
Fixed ticket #411 (false positive: resource leak in while loop)
2009-06-20 13:58:30 +02:00
Daniel Marjamäki
5d0d21d668
Fixed a false positive (memory leak)
...
This false positive was first discovered in the VLC sourcecode. The TestMemoryLeakInFunction::simple11 test case is a simplified test code of that code.
2009-06-17 21:42:49 +02:00
Daniel Marjamäki
b7c9a4ed8c
Created a new class for detecting leaks (forgetting to free struct members)
2009-06-16 22:01:04 +02:00
Daniel Marjamäki
ed98f1b367
Fixed #131 (Regression: leak reported by 1.27 is not reported by 1.29)
...
The leak will be reported as a definite bug again. Not just a possible bug.
cppcheck don't know if the execution path is possible, but it knows that if the execution path is taken the memory leak will be certain.
2009-06-16 19:05:05 +02:00
Daniel Marjamäki
a81b6487bf
Improved the "CheckMemoryLeak::functionReturnType"
2009-06-15 21:13:39 +02:00