summaryrefslogtreecommitdiffstats
path: root/module/zfs/zcp_get.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-10-10 09:47:06 -0700
committerBrian Behlendorf <[email protected]>2019-10-10 09:47:06 -0700
commite4f5fa12290016b2f1fd6a5b4c7e5733c788c863 (patch)
tree51a33853a1161198daf1195ec09da33e9a905392 /module/zfs/zcp_get.c
parentc5858ff9462719be60b2ffb0065dd01508a63162 (diff)
Fix strdup conflict on other platforms
In the FreeBSD kernel the strdup signature is: ``` char *strdup(const char *__restrict, struct malloc_type *); ``` It's unfortunate that the developers have chosen to change the signature of libc functions - but it's what I have to deal with. Reviewed-by: Jorgen Lundman <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9433
Diffstat (limited to 'module/zfs/zcp_get.c')
-rw-r--r--module/zfs/zcp_get.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/zfs/zcp_get.c b/module/zfs/zcp_get.c
index 42c125d48..974d3328c 100644
--- a/module/zfs/zcp_get.c
+++ b/module/zfs/zcp_get.c
@@ -431,9 +431,9 @@ get_special_prop(lua_State *state, dsl_dataset_t *ds, const char *dsname,
if (strcmp(strval, "") == 0)
error = ENOENT;
- strfree(childval);
+ kmem_strfree(childval);
}
- strfree(token);
+ kmem_strfree(token);
break;
}
case ZFS_PROP_VOLSIZE:
@@ -661,7 +661,7 @@ get_userquota_prop(const char *prop_name)
* prop type as well as the numeric group/user ids based on the string
* following the '@' in the property name. On success, returns 0. On failure,
* returns a non-zero error.
- * 'domain' must be free'd by caller using strfree()
+ * 'domain' must be free'd by caller using kmem_strfree()
*/
static int
parse_userquota_prop(const char *prop_name, zfs_userquota_prop_t *type,
@@ -688,7 +688,7 @@ parse_userquota_prop(const char *prop_name, zfs_userquota_prop_t *type,
(void) ddi_strtoll(cp, &end, 10, (longlong_t *)rid);
if (*end != '\0') {
- strfree(domain_val);
+ kmem_strfree(domain_val);
return (EINVAL);
}
} else {
@@ -736,7 +736,7 @@ zcp_get_userquota_prop(lua_State *state, dsl_pool_t *dp,
}
}
if (domain != NULL)
- strfree(domain);
+ kmem_strfree(domain);
}
dsl_dataset_rele(ds, FTAG);