Bug 891669
Summary: | cppcheck error: extras/scsi_id/scsi_id.c: Memory leak: newargv [error] | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Karel Volný <kvolny> |
Component: | udev | Assignee: | Harald Hoyer <harald> |
Status: | CLOSED ERRATA | QA Contact: | Radka Brychtova <rskvaril> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.4 | CC: | msekleta, psklenar, rskvaril, udev-maint-list |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | udev-147-2.66.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-05-11 00:25:49 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1270825 |
Description
Karel Volný
2013-01-03 15:39:50 UTC
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. int main(int argc, char **argv) { ... if (set_options(udev, newargc, newargv, short_options, maj_min_dev) < 0) { retval = 2; free(newargv); // <--------- MISSING goto exit; } free(newargv); ... } (In reply to Harald Hoyer from comment #3) > free(newargv); // <--------- MISSING I've merged to my staging branch a different patch, because freeing just newargv is not enough. We also need to free newargv[0] because this is a pointer to buffer which actually hold the arguments. Btw, such patch is also upstream. While at it, I also merged one more patch which prevents fd leak, also already upstream. Cppcheck is now part of Covscan in Errata-tool. Cppcheck is clear in version udev-147-2.70.el6. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0903.html |