Bug 704567 - Possible problems found by static analysis of code
Summary: Possible problems found by static analysis of code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: portreserve
Version: 15
Hardware: All
OS: All
low
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 718176
TreeView+ depends on / blocked
 
Reported: 2011-05-13 15:45 UTC by Jiri Popelka
Modified: 2011-07-18 22:40 UTC (History)
1 user (show)

Fixed In Version: portreserve-0.0.5-2.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 718176 (view as bug list)
Environment:
Last Closed: 2011-07-04 18:51:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
small memory leak (1.01 KB, text/plain)
2011-05-13 15:46 UTC, Jiri Popelka
no flags Details

Description Jiri Popelka 2011-05-13 15:45:06 UTC
Description of problem:
Static analysis of the code with/without applied patches discovered
some possible problems in the code.


Version-Release number of selected component (if applicable):
portreserve-0.0.4-8.fc15

Comment 1 Jiri Popelka 2011-05-13 15:46:22 UTC
Created attachment 498794 [details]
small memory leak

Error: RESOURCE_LEAK:
portreserve-0.0.4/src/portreserve.c:244: alloc_fn: Calling allocation function "malloc".
portreserve-0.0.4/src/portreserve.c:244: var_assign: Assigning: "cfgfile" =  storage returned from "malloc(strlen(dir) + 255UL + 1UL)".
portreserve-0.0.4/src/portreserve.c:245: var_assign: Assigning: "cfgf" = "cfgfile".
portreserve-0.0.4/src/portreserve.c:251: noescape: Variable "cfgfile" is not freed or pointed-to in function "strcpy".
portreserve-0.0.4/src/portreserve.c:254: leaked_storage: Variable "cfgf" going out of scope leaks the storage it points to.
portreserve-0.0.4/src/portreserve.c:254: leaked_storage: Variable "cfgfile" going out of scope leaks the storage it points to.
portreserve-0.0.4/src/portreserve.c:260: noescape: Variable "cfgf" is not freed or pointed-to in function "strcpy".
portreserve-0.0.4/src/portreserve.c:261: noescape: Variable "cfgfile" is not freed or pointed-to in function "reserve".
portreserve-0.0.4/src/portreserve.c:120:22: noescape: "reserve" does not free or save its pointer parameter "file".
portreserve-0.0.4/src/portreserve.c:314: leaked_storage: Variable "cfgf" going out of scope leaks the storage it points to.
portreserve-0.0.4/src/portreserve.c:314: leaked_storage: Variable "cfgfile" going out of scope leaks the storage it points to.

Comment 2 Tim Waugh 2011-05-20 15:00:27 UTC
Thanks, applied upstream.

Comment 3 Fedora Update System 2011-06-24 18:34:07 UTC
portreserve-0.0.5-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/portreserve-0.0.5-1.fc15

Comment 4 Fedora Update System 2011-06-24 18:34:46 UTC
portreserve-0.0.5-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/portreserve-0.0.5-1.fc14

Comment 5 Fedora Update System 2011-06-25 19:57:42 UTC
Package portreserve-0.0.5-1.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing portreserve-0.0.5-1.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/portreserve-0.0.5-1.fc14
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-07-04 18:50:55 UTC
portreserve-0.0.5-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2011-07-18 22:39:53 UTC
portreserve-0.0.5-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.