Rebase master to b108
[zfs.git] / lib / libzfs / libzfs_util.c
index 4270ac5..259f5fd 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