Skip to content
Snippets Groups Projects
Commit e4f31af3 authored by Mactavish's avatar Mactavish
Browse files

add cirtical situation

parent 52654272
No related branches found
No related tags found
No related merge requests found
...@@ -452,6 +452,15 @@ int main() { ...@@ -452,6 +452,15 @@ int main() {
> There is a problem for this program, can you find out? > There is a problem for this program, can you find out?
#### Critical Situations
- **Memory leak**: if you forget to deallocate memory - your program **will eventually run out of memory**
- **Double free**: if you call `free` twice on the same memory - possible **crash or exploitable vulnerability**
- **Use after free**: if you use data after calling `free` - possible **crash or exploitable vulnerability**
In short, too many bad things can happen if you don't manage the memory correctly!
Any solution? Yes, use [valgrind](https://valgrind.org/).
## C Compilation Process ## C Compilation Process
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment