Project

General

Profile

Bug #7731

libdladm`i_dladm_set_single_prop() leaks memory when resetting properties without default value

Added by Yuri Pankov over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2017-01-05
Due date:
% Done:

100%

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

Description

antares:root:~# dladm create-vlan -l vmxnet3s1 -v 2 vlan1
antares:root:~# mdb dladm
 > ::sysbp _exit
 > ::run delete-vlan vlan1
mdb: stop on entry to _exit
mdb: target stopped at:
0xfee556ba:     nop
mdb: You've got symbols!
Loading modules: [ ld.so.1 libumem.so.1 libc.so.1 ]
 > ::findleaks -d
CACHE     LEAKED   BUFCTL CALLER
080ca590       1 08104848 libdladm.so.1`check_zone+0x36
------------------------------------------------------------------------
    Total       1 buffer, 16 bytes

umem_alloc_16 leak: 1 buffer, 16 bytes
             ADDR          BUFADDR        TIMESTAMP           THREAD
                             CACHE          LASTLOG         CONTENTS
          8104848          80fffa0      1493155b88b                1
                           80ca590          8092320                0
                  libumem.so.1`umem_cache_alloc_debug+0x1fe
                  libumem.so.1`umem_cache_alloc+0x18f
                  libumem.so.1`umem_alloc+0x50
                  libumem.so.1`umem_malloc+0x36
                  libdladm.so.1`check_zone+0x36
                  libdladm.so.1`i_dladm_set_single_prop+0x1c7
                  libdladm.so.1`i_dladm_set_linkprop+0x97
                  libdladm.so.1`dladm_set_linkprop+0x6b
                  libdladm.so.1`dladm_vnic_delete+0x9a
                  libdladm.so.1`dladm_vlan_delete+0x25
                  do_delete_vlan+0xcf
                  main+0xac
                  _start+0x83
 >

Also available in: Atom PDF