Bug 8071

Summary: Memory leak in print lpd/printjob.c
Product: [Retired] Red Hat Linux Reporter: Michael O'Keefe <mokeefe>
Component: lprAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-05 18:15:48 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:

Description Michael O'Keefe 1999-12-30 20:58:59 UTC
Line 779 of lpd/printjob.c
            dup_cfpname = strdup(file);

>> You now lose the handle to this part of the memory. You will never be
>> able to free() it !! The whole preceeding line should be deleted since
>> it's goal is completed by the following line

            if (!(dup_cfpname = strdup(file)))
                {
                    syslog(LOG_ERR, "Can't allocate memory for temp cfp
file name");
                    return(OK);
                }

Comment 1 Bernhard Rosenkraenzer 2000-01-05 18:15:59 UTC
Fixed in lpr 0.47