Project

General

Profile

Actions

Bug #14359

open

svccfg leaks in create_instance_list()

Added by Marcel Telka 6 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
cmd - userland programs
Start date:
Due date:
% Done:

0%

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

Description

The return at line 16268 should be replaced by goto out to avoid inst_iter and inst leaks here in create_instance_list():


16260      inst_iter = scf_iter_create(g_hndl);
16261      inst = scf_instance_create(g_hndl);
16262      if (inst_iter == NULL || inst == NULL) {
16263          uu_warn(gettext("Could not create instance or iterator\n"));
16264          scfdie();
16265      }
16266  
16267      if ((instances = uu_list_create(string_pool, NULL, 0)) == NULL)
16268          return (instances);

...

16357  out:
16358      if (snap)
16359          scf_snapshot_destroy(snap);
16360  
16361      scf_instance_destroy(inst);
16362      scf_iter_destroy(inst_iter);
16363      free(instname);
16364      return (instances);

Related issues

Related to illumos gate - Bug #14342: svccfg cleanup dumps core in create_instance_listClosedYuri Pankov

Actions
Actions #1

Updated by Marcel Telka 6 months ago

  • Related to Bug #14342: svccfg cleanup dumps core in create_instance_list added
Actions

Also available in: Atom PDF