-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add all bugs #3
base: master
Are you sure you want to change the base?
Add all bugs #3
Conversation
|
||
void dead_store(struct POINT *pnt) | ||
{ | ||
int new_x = 9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEAD_STORE: The value written to &new_x (type int) is never used.
return (-2); | ||
} | ||
|
||
return -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MEMORY_LEAK: memory dynamically allocated to return
by call to malloc()
at line 48, column 23 is not reachable after line 54, column 5.
{ | ||
struct POINT *p = malloc(sizeof(struct POINT)); | ||
|
||
get_x(p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NULL_DEREFERENCE: pointer p
last assigned on line 66 could be null and is dereferenced by call to get_x()
at line 68, column 5.
return 1; | ||
} | ||
|
||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RESOURCE_LEAK: resource of type _IO_FILE
acquired to return
by call to fopen()
at line 37, column 14 is not released after line 43, column 5.
No description provided.