Skip to content

Commit

Permalink
7730 libzfs`add_config() leaks config nvl when reading spare/l2cache …
Browse files Browse the repository at this point in the history
…devices

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
Yuri Pankov authored and ahrens committed Jan 13, 2017
1 parent f5fb56d commit 1056865
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions usr/src/lib/libzfs/common/libzfs_import.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,12 @@ add_config(libzfs_handle_t *hdl, pool_list_t *pl, const char *path,
free(ne);
return (-1);
}

ne->ne_guid = vdev_guid;
ne->ne_next = pl->names;
pl->names = ne;

nvlist_free(config);
return (0);
}

Expand Down

0 comments on commit 1056865

Please sign in to comment.