Coverity RESOURCE_LEAK - CID 12499
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Compiz |
Fix Released
|
High
|
Sami Jaktholm | ||
0.9.9 |
Won't Fix
|
High
|
Unassigned | ||
compiz (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This bug is exported from the Coverity Integration Manager on Canonical's servers. For information on how this is done please see this website: https:/
CID: 12499
Checker: RESOURCE_LEAK
Category: No category available
CWE definition: http://
File: /tmp/buildd/
Function: TitleinfoScreen
Code snippet:
159 if (XGetTextProperty (screen->dpy (), id, &text, atom))
160 {
161 if (text.value)
162 {
CID 12499 - RESOURCE_LEAK
Storage is returned from allocation function "malloc(size_t)".
Assigning: "retval_c" = storage returned from "malloc(1UL * (text.nitems + 1UL))".
163 retval_c = (char *) malloc (sizeof (char) * (text.nitems + 1));
164 if (retval_c)
165 {
CID 12499 - RESOURCE_LEAK
Resource "retval_c" is not freed or pointed-to in function "strncpy(char *, char const *, size_t)".
166 strncpy (retval_c, (char *) text.value, text.nitems);
167 retval_
168 }
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Sam Spilsbury: Approve
-
Diff: 25 lines (+6/-0)1 file modifiedplugins/titleinfo/src/titleinfo.cpp (+6/-0)
Changed in compiz: | |
status: | New → In Progress |
assignee: | nobody → Sami Jaktholm (sjakthol) |
Changed in compiz: | |
status: | Fix Committed → Fix Released |
Source file with Coverity annotations.