← Back to team overview

desktop-packages team mailing list archive

[Bug 1101454] Re: Coverity RESOURCE_LEAK - CID 12500

 

** 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/1101454

Title:
  Coverity RESOURCE_LEAK - CID 12500

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: 12500
  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::getUtf8Property(unsigned long, unsigned long)
  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 	}

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