-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
r.in.gdal: Fix Resource Leak Issue in main.c #5301
base: main
Are you sure you want to change the base?
Conversation
Please address CID1415647 and CID1415695 here too. |
these are from vector is it okay to combine it with fix of raster in same pull request |
They are from |
for now i have added the proj.c from raster |
G_free_key_value(loc_proj_units); | ||
G_free_key_value(loc_proj_info); |
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.
You can move these lines to the previous scope, after line 353. In addition you can move the definition/initialisation of loc_proj_units
and loc_proj_info
(L14) to the beginning of the else-statement starting at L153.
You can insert here, as in #5303, freeing of proj_units
and proj_info
after the else-statement (after L354).
It seems that the CIDs is mixed up, because of identical code in r.in.gdal, v.in.gdal, r.external and v.external. The same fix should be applied to all, but in separate PRs. #5303 is a good start. |
This pull request fixes issue identified by coverity scan (CID : 1248588)
Used
G_free()
to fix this issue.