Sample code for c in memory-leak-in-c is wrong
- Langage dominant
- OCaml
- Étoiles
- 15.7k
- Forks
- 2.1k
- Merge moyen
- 19 h 36 min
- PR mergées (30 j)
- 13
Description
It is just document typo in https://fbinfer.com/docs/all-issue-types#memory-leak-in-c
Bellow code is not legal c-syntax.
```c
-(void) memory_leak_bug {
struct Person *p = malloc(sizeof(struct Person));
}
```
I think it should be:
```c
void memory_leak_bug () {
struct Person *p = malloc(sizeof(struct Person));
}
```
Please include the following information:
- [-] The version of infer from `infer --version`.
- [-] Your operating system and version, for example "Debian 9", "MacOS High Sierra", whether you are using Docker, etc.
- [-] Which command you ran, for example `infer -- make`.
- [-] The full output in a paste, for instance a [gist](https://gist.github.com/).
- [-] If possible, a minimal example to reproduce your problem (for instance, some code where
infer reports incorrectly, together with the way you run infer to reproduce the incorrect
report).
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.