HomeClusterLabs Projects
Diffusion Booth d9b1f0dd43ad

attr: Fix memory leak for list and get operation
d9b1f0dd43adUnpublished

Unpublished Commit ยท Learn More

  • Repository Importing: This repository is still importing.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

attr: Fix memory leak for list and get operation

attr_get and attr_list were allocation GString but they were calling
g_string_free with second argument set to FALSE, what means GLib
was returning character data to caller (see g_string_free
for complete documentation) instead of freeing them. This return
value was ignored by attr_* functions so memory leaked.

Patch to fix this problem is simple - just set second argument of
g_string_free to TRUE so GLib takes care of freeing all data.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>

Details

Provenance
jfriesseAuthored on Sep 25 2023, 12:26 PM
Dejan Muhamedagic <dejanmm@fastmail.fm>Committed on Oct 20 2023, 8:37 AM
Parents
rBed4b362ed3d8: main: Fix exit code on grant/revoke command error
Branches
Unknown
Tags
Unknown

Event Timeline