Project

General

Profile

Actions

Bug #9457

closed

libzfs_import.c:add_config() has a memory leak

Added by Brad Lewis over 5 years ago. Updated over 5 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

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.

Actions #1

Updated by Electric Monk over 5 years ago

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

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>

Actions

Also available in: Atom PDF