Actions
Bug #7932
closedcfgadm_plugins/shp: memory leaks in cfga_list_ext()
Start date:
2017-03-03
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
Memory leak reported by our jenkins tests:
Memory leak from /var/cores/core.memleaks.sasWorker.462388: ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS af5f4e0 af600c8 7d7f49c89cc5 14 91bd010 0 0 libumem.so.1`umem_cache_alloc_debug+0x1fe libumem.so.1`umem_cache_alloc+0x99 libumem.so.1`umem_alloc+0x50 libumem.so.1`umem_malloc+0x36 libc.so.1`strdup+0x2e libhotplug.so.1`i_hp_parse_results+0xa3 libhotplug.so.1`hp_get_private+0x10d shp.so.1`cfga_list_ext+0x2e5 libcfgadm.so.1`stat_plugin_v2+0x7f libcfgadm.so.1`do_list_common_impl+0x108 libcfgadm.so.1`do_list_common_hp+0x16 libdevinfo.so.1`di_walk_hp_callback+0x82 libdevinfo.so.1`walk_one_node+0x4f libdevinfo.so.1`di_walk_node+0xbe libdevinfo.so.1`di_walk_hp+0x7a libcfgadm.so.1`list_common+0xaa libcfgadm.so.1`config_list_ext+0xde cfgadm.node`_ZN3nef13CfgadmListJob8beginJobEv+0x52 cfgadm.node`_ZN3nef8AsyncJob10onBeginJobEP9uv_work_s+0x21 worker+0xa2 uv__thread_start+0x1b libc.so.1`_thrp_setup+0x88 libc.so.1`_lwp_start
and closer look reveals there is indeed a bug in http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/cfgadm_plugins/shp/common/shp.c#1506 . The return parameter cardtype is never freed if the call to hp_get_private() was successful.
Updated by Electric Monk over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
git commit 89ac1330de393e78c8b27c33453223b10d3c18da
commit 89ac1330de393e78c8b27c33453223b10d3c18da Author: Yuri Pankov <yuri.pankov@nexenta.com> Date: 2017-03-05T17:18:54.000Z 7932 cfgadm_plugins/shp: memory leaks in cfga_list_ext() Reviewed by: Jan Kryl <jan.kryl@nexenta.com> Reviewed by: Dan Fields <dan.fields@nexenta.com> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Robert Mustacchi <rm@joyent.com>
Actions