sdimitro commented on this pull request.
> for (int i = 0; i < sharearg->zhandle_len; ++i) {
zfs_handle_t *fs_handle =
((zfs_handle_t **)(sharearg->zhandle_arr))[i];
if (fs_handle == NULL) {
+ /* Free non-null elements of the paths array */
+ for (int free_idx = 0; free_idx < *paths_len;
+ ++free_idx) {
+ if ((*paths)[free_idx] != NULL)
+ free((*paths)[free_idx]);
+ }
+ free(*paths);
+ *paths = NULL;
+ *paths_len = 0;
return (SA_SYSTEM_ERR);
}
(*paths)[i] = malloc(sizeof (char) * ZFS_MAXPROPLEN);
err |= sa_get_zfs_share_common(handle, fs_handle, (*paths)[i],
Review updated
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/473#discussion_r141176755
------------------------------------------
openzfs-developer
Archives:
https://openzfs.topicbox.com/groups/developer/discussions/Tcc0964d15893ff46-Mfd7da22f1daf160c45740f70
Powered by Topicbox: https://topicbox.com