Bug 87097

Summary: Patch: plug a memory leak in core
Product: systemd Reporter: Pierre Schweitzer <pierre>
Component: generalAssignee: systemd-bugs
Status: RESOLVED NOTABUG QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch as a git commit

Description Pierre Schweitzer 2014-12-08 10:17:51 UTC
Created attachment 110563 [details]
Patch as a git commit

Dear all,

Please find attached a patch that fixes a leak in core.
Just for the record, regarding the free() call, free() is no op in case it receives a null pointer, so it's fine to call it whatever happens.

With my best regards,
P. Schweitzer
Comment 1 Lennart Poettering 2014-12-08 14:18:46 UTC
The code is not as easy to grok as it would be good, but there isn't a leakhere actually. Note that r can only be negative if "printed" fails to be allocated, but in that case we don't need to free it...

Thanks, anyway, for the report!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.