Bug 558605 - rhnsd memory leak
Summary: rhnsd memory leak
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 0.7
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
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)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
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):

How reproducible:

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:

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.