Bug 558605

Summary: rhnsd memory leak
Product: [Community] Spacewalk Reporter: Lee Verberne <redhat>
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 0.7CC: redhat, roysjosh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-19 08:24:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 585232    
Attachments:
Description Flags
Patch to fix regex memory leak none

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.