Print this page
5918 Memory leak when zfs_destroy_snaps_nvl fails

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libzfs/common/libzfs_dataset.c
          +++ new/usr/src/lib/libzfs/common/libzfs_dataset.c
↓ open down ↓ 3407 lines elided ↑ open up ↑
3408 3408                          zfs_error_aux(hdl,
3409 3409                              dgettext(TEXT_DOMAIN, "snapshot is cloned"));
3410 3410                          ret = zfs_error(hdl, EZFS_EXISTS, errbuf);
3411 3411                          break;
3412 3412                  default:
3413 3413                          ret = zfs_standard_error(hdl, errno, errbuf);
3414 3414                          break;
3415 3415                  }
3416 3416          }
3417 3417  
     3418 +        nvlist_free(errlist);
3418 3419          return (ret);
3419 3420  }
3420 3421  
3421 3422  /*
3422 3423   * Clones the given dataset.  The target must be of the same type as the source.
3423 3424   */
3424 3425  int
3425 3426  zfs_clone(zfs_handle_t *zhp, const char *target, nvlist_t *props)
3426 3427  {
3427 3428          char parent[ZFS_MAXNAMELEN];
↓ open down ↓ 1303 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX