Memory leak : Add a new test that currently fail to highlight a regression
This commit is contained in:
parent
e29ead375f
commit
0c2f90dceb
|
@ -127,6 +127,7 @@ private:
|
|||
TEST_CASE( func9 ); // Embedding the function call in a if-condition
|
||||
TEST_CASE( func10 ); // Bug 2458510 - Function pointer
|
||||
TEST_CASE( func11 ); // Bug 2458510 - Function pointer
|
||||
// TODO TEST_CASE( func12 );
|
||||
|
||||
TEST_CASE( class1 );
|
||||
TEST_CASE( class2 );
|
||||
|
@ -1023,6 +1024,22 @@ private:
|
|||
ASSERT_EQUALS( std::string(""), errout.str() );
|
||||
}
|
||||
|
||||
void func12()
|
||||
{
|
||||
check( "static void f()\n"
|
||||
"{\n"
|
||||
" char *buf = NULL, *tmp;\n"
|
||||
" if (!(tmp = realloc(buf, 50)))\n"
|
||||
" {\n"
|
||||
" free(buf);\n"
|
||||
" return NULL;\n"
|
||||
" }\n"
|
||||
" buf = tmp;\n"
|
||||
" return buf;\n"
|
||||
"}\n" );
|
||||
ASSERT_EQUALS( std::string(""), errout.str() );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void func3()
|
||||
|
|
Loading…
Reference in New Issue