Bug 558605 - rhnsd memory leak
Summary: rhnsd memory leak
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 0.7
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: space11
TreeView+ depends on / blocked
 
Reported: 2010-01-25 19:32 UTC by Lee Verberne
Modified: 2010-08-19 08:24 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-08-19 08:24:40 UTC


Attachments (Terms of Use)
Patch to fix regex memory leak (223 bytes, patch)
2010-01-25 19:32 UTC, Lee Verberne
no flags Details | Diff

Description Lee Verberne 2010-01-25 19:32:44 UTC
Created attachment 386691 [details]
Patch to fix regex memory leak

Description of problem:
parse_systemid_path() calls regcomp() without ever calling regfree().  regcomp() uses malloc() to allocate buffers in (regex_t *)preg.  regfree(&re_systemIdPath) should be called prior to the return from parse_systemid_path().  Patch attached.

Version-Release number of selected component (if applicable):
rhnsd-4.5.16-1

How reproducible:
consistent

Steps to Reproduce:
1. run rhnsd with a low interval (better yet, compile a version to bypass minimum interval to 60 minutes)
2. watch memory consumption grow
  
Actual results:
Leaks memory.

Expected results:
Doesn't leak memory.

Additional info:
https://www.redhat.com/archives/spacewalk-list/2010-January/msg00172.html

Comment 1 Joshua Roys 2010-05-11 16:09:38 UTC
Fixed in master as of f987184526fb2cecf47b9dce8bf69c1c66a86d88 on Mar 18.  Sorry it took so long...

Comment 2 Milan Zázrivec 2010-08-19 08:24:40 UTC
Spacewalk 1.1 has been released.


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