Bug 87097 - Patch: plug a memory leak in core
Summary: Patch: plug a memory leak in core
Status: RESOLVED NOTABUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-08 10:17 UTC by Pierre Schweitzer
Modified: 2014-12-08 14:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch as a git commit (849 bytes, text/plain)
2014-12-08 10:17 UTC, Pierre Schweitzer
Details

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.