HomeClusterLabs Projects

Fix: libservices: potential memory leaks when executing systemd actions

Description

Fix: libservices: potential memory leaks when executing systemd actions

libservices tracks one pending call per operation. Previously, systemd
operations would update the tracked call regardless of whether a call was
already being tracked, in which case the earlier call's memory would be lost.
Now, if an existing call is tracked, it is unreferenced before updating.

Also, when creating the new pending call, systemd operations would explicitly
add a call reference, even though one was implicitly added via creation. Since
the callback unreferenced it only once, that could lead to a leak. Now, the
redundant reference is not added.

Details

Provenance
kgaillotAuthored on Jul 13 2015, 1:29 PM
Parents
rP939bf0fc30b4: Fix: libservices: memory leak in DBus-related log messages
Branches
Unknown
Tags
Unknown

Event Timeline