Summary: | Potential deallocation at null pointer while getting of extra extensions info | ||
---|---|---|---|
Product: | Mesa | Reporter: | Alexander Tsvetkov <alex78_rus> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED NOTABUG | QA Contact: | |
Severity: | minor | ||
Priority: | medium | CC: | jfonseca |
Version: | 7.11 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Alexander Tsvetkov
2011-10-11 05:04:29 UTC
free(NULL) is allowed, at least on linux. I could fix this, but there are many other cases in the source where this happens, and it would be a distraction from real issues to fix them all now. It looks like this issue was spotted by a static code analysis tool. Could you reconfigure the tool to not report free(NULL) issues instead? free(NULL) is allowed by the C standard. See ISO-IEC 9899:1999 from http://open-std.org/JTC1/SC22/WG14/www/standards. 7.20.3.2 The free function causes the space pointed to by ptr to be deallocated, that is, made available for further allocation. If ptr is a null pointer, no action occurs. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.