Project

General

Profile

Actions

Bug #2071

closed

"libhal_device_free_changeset" function mem-leeks.

Added by Roman Strashkin over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2012-02-03
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

http://src.illumos.org/source/s?refs=libhal_device_free_changeset&project=illumos-gate

"LibHalChangeSetElement" struct contains "key" member, which is not freed by the function.

fix:

diff -r 48985d630b76 usr/src/lib/hal/libhal/common/libhal.c
--- a/usr/src/lib/hal/libhal/common/libhal.c    Mon Jan 30 18:55:11 2012 +0100
+++ b/usr/src/lib/hal/libhal/common/libhal.c    Fri Feb 03 08:57:57 2012 -0800
@@ -4182,6 +4182,7 @@
                        fprintf (stderr, "%s %d : unknown change_type %d\n", __FILE__, __LINE__, elem->change_type);
                        break;
                }
+         free (elem->key);
                free (elem);
        }


Related issues

Related to illumos gate - Feature #2100: update HAL to 0.5.14NewMilan Jurik2012-03-28

Actions
Related to illumos gate - Bug #2555: libhal does not unref some messagesResolvedMilan Jurik2012-03-28

Actions
Related to illumos gate - Bug #2666: libhal should be more carefull about function parametersResolvedMilan Jurik2012-05-01

Actions
Actions

Also available in: Atom PDF