Coverity RESOURCE_LEAK - CID 12500
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: 12500
Checker: RESOURCE_LEAK
Category: No category available
CWE definition: http://
File: /tmp/buildd/
Function: TitleinfoScreen
Code snippet:
129 return retval;
130
131 if (type == Atoms::utf8String && format == 8 && val && nItems > 0)
132 {
CID 12500 - RESOURCE_LEAK
Storage is returned from allocation function "malloc(size_t)".
Assigning: "retval_c" = storage returned from "malloc(1UL * (nItems + 1UL))".
133 retval_c = (char *) malloc (sizeof (char) * (nItems + 1));
134 if (retval_c)
135 {
CID 12500 - RESOURCE_LEAK
Resource "retval_c" is not freed or pointed-to in function "strncpy(char *, char const *, size_t)".
136 strncpy (retval_c, val, nItems);
137 retval_c[nItems] = 0;
138 }
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.