]> git.proxmox.com Git - mirror_zfs.git/blobdiff - lib/libzfs/libzfs_util.c
Rebase master to b108
[mirror_zfs.git] / lib / libzfs / libzfs_util.c
index 4270ac5206782d60c4fafa69f6cbe3bd50f831dd..259f5fd4961572542014b7e6ebfd933ee74d3167 100644 (file)
@@ -480,7 +480,6 @@ zfs_realloc(libzfs_handle_t *hdl, void *ptr, size_t oldsize, size_t newsize)
 
        if ((ret = realloc(ptr, newsize)) == NULL) {
                (void) no_memory(hdl);
-               free(ptr);
                return (NULL);
        }
 
@@ -1018,9 +1017,9 @@ zfs_nicestrtonum(libzfs_handle_t *hdl, const char *value, uint64_t *num)
                return (-1);
        }
 
-       /* Rely on stroll() to process the numeric portion.  */
+       /* Rely on stroull() to process the numeric portion.  */
        errno = 0;
-       *num = strtoll(value, &end, 10);
+       *num = strtoull(value, &end, 10);
 
        /*
         * Check for ERANGE, which indicates that the value is too large to fit