Test: Updated 'testmemcheck4' and 'testmemcheck5' (continue/break)
This commit is contained in:
parent
7e54a6af54
commit
c7cc0d0f9c
|
@ -1 +1 @@
|
|||
[testmemcheck4\testmemcheck4.cpp:10]: Memory leak:str
|
||||
[testmemcheck4\testmemcheck4.cpp:9]: Memory leak:str
|
||||
|
|
|
@ -7,6 +7,7 @@ void f()
|
|||
char *str = strdup("hello");
|
||||
if (condition)
|
||||
continue;
|
||||
free(str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
|
||||
void f()
|
||||
{
|
||||
char *str = strdup("hello");
|
||||
while (condition)
|
||||
{
|
||||
if (condition)
|
||||
break;
|
||||
}
|
||||
free(str);
|
||||
}
|
||||
|
Loading…
Reference in New Issue