← Back to team overview

desktop-packages team mailing list archive

[Bug 1101569] Re: Coverity RESOURCE_LEAK - CID 12499

 

** Changed in: compiz
       Status: Fix Committed => Fix Released

** Changed in: compiz/0.9.9
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to compiz in Ubuntu.
https://bugs.launchpad.net/bugs/1101569

Title:
  Coverity RESOURCE_LEAK - CID 12499

Status in Compiz:
  Fix Released
Status in Compiz 0.9.9 series:
  Won't Fix
Status in “compiz” package in Ubuntu:
  Fix Released

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://wiki.ubuntu.com/CanonicalProductStrategy/Coverity
  CID: 12499
  Checker: RESOURCE_LEAK
  Category: No category available
  CWE definition: http://cwe.mitre.org/data/definitions/404.html
  File: /tmp/buildd/compiz-0.9.9~daily13.01.14/plugins/titleinfo/src/titleinfo.cpp
  Function: TitleinfoScreen::getTextProperty(unsigned long, unsigned long)
  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_c[text.nitems] = 0;
  168 	    }

To manage notifications about this bug go to:
https://bugs.launchpad.net/compiz/+bug/1101569/+subscriptions