Bug 91413

Summary: dhcp daemon memory leak
Product: [Retired] Red Hat Linux Reporter: Steve Grubb <linux_4ever>
Component: dhcpAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
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: 2003-06-16 19:38:52 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:
Attachments:
Description Flags
Patch to fix memory leak none

Description Steve Grubb 2003-05-22 13:35:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
The current version of the daemon leaks memory in the parser. I will attach a
patch that fixes the memory leak.

Version-Release number of selected component (if applicable):
dhcp-3.0pl1-23

How reproducible:
Always

Steps to Reproduce:
/etc/rc.d/init.d/dhcpd stop

valgrind --leak-check=yes --leak-resolution=high --num-callers=8 --logfile-fd=19
/usr/sbin/dhcpd -cf /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample 19>out

/etc/rc.d/init.d/dhcpd stop

vi out

Actual Results:  ==1805== 18 bytes in 1 blocks are definitely lost in loss
record 23 of 143
==1805==    at 0x400284E6: malloc (vg_replace_malloc.c:153)
==1805==    by 0x809B526: dmalloc (alloc.c:71)
==1805==    by 0x806F74C: parse_host_name (parse.c:242)
==1805==    by 0x806F8C4: parse_ip_addr_or_hostname (parse.c:284)
==1805==    by 0x8077934: parse_option_token (parse.c:4372)
==1805==    by 0x80773F0: parse_option_statement (parse.c:4200)
==1805==    by 0x8071D79: parse_executable_statement (parse.c:2002)
==1805==    by 0x8055C3B: parse_statement (confpars.c:669)


Expected Results:  No leak.

Additional info:

The leak is config file dependant.

Comment 1 Steve Grubb 2003-05-22 13:36:35 UTC
Created attachment 91890 [details]
Patch to fix memory leak

Comment 2 Daniel Walsh 2003-06-16 19:38:52 UTC
Fixed in dhcp-3.0pl2-6.2.src.rpm


Thanks 

Dan