Project

General

Profile

Actions

Bug #2071

closed

"libhal_device_free_changeset" function mem-leeks.

Added by Roman Strashkin over 11 years ago. Updated about 11 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:
External Bug:

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 #1

Updated by Milan Jurik about 11 years ago

  • Status changed from New to In Progress
  • Assignee set to Milan Jurik
  • Tags deleted (needs-triage)

It seems there are few leaks more in the code, I will look at them.

Actions #2

Updated by Igor Pashev about 11 years ago

Why HAL is maintained in illumos-gate? It should be in userland.

Actions #3

Updated by Rich Lowe about 11 years ago

Because all the important parts had to be written fresh for the Solaris port, and it (in theory, I haven't checked recently) consumes some deeply private interfaces.

Actions #4

Updated by Milan Jurik about 11 years ago

  • % Done changed from 0 to 20

Not only that. Upstream abandoned HAL, so all its development is on us now anyway. Some of Solaris specific parts were pushed to upstream but it does not seem all was done before HAL upstream stalled.

Actions #5

Updated by Milan Jurik about 11 years ago

  • % Done changed from 20 to 100
  • Difficulty changed from Medium to Bite-size
Actions #6

Updated by Milan Jurik about 11 years ago

Fix for RTI matches what Roman Strashkin proposed, it is from upstream.

The rest of possible leaks is covered by other issues.

Actions #7

Updated by Milan Jurik about 11 years ago

  • Status changed from In Progress to Pending RTI
Actions #8

Updated by Rich Lowe about 11 years ago

  • Status changed from Pending RTI to Resolved

Resolved in r13658 commit:1e6115622470

Actions

Also available in: Atom PDF