Project

General

Profile

Bug #9457

libzfs_import.c:add_config() has a memory leak

Added by Brad Lewis over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-04-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

A memory leak occurs on lines 209 and 213 because the config is not freed in the error case.
The interface to add_config() seems less than ideal - it would be better if it copied any data
necessary from the config and the caller freed it.

History

#1

Updated by Electric Monk about 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit ddfe901b12348d31c500fb57f9174e88860a4061

commit  ddfe901b12348d31c500fb57f9174e88860a4061
Author: sara hartse <sara.hartse@delphix.com>
Date:   2018-06-01T16:22:51.000Z

    9457 libzfs_import.c:add_config() has a memory leak
    Reviewed by: Matt Ahrens <matt@delphix.com>
    Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF