Print this page
6141 use kmem_zalloc instead of kmem_alloc + bzero/memset

*** 955,968 **** * taskq func must free arg. */ arg = kmem_alloc(sizeof (*arg), KM_SLEEP); /* taskq func must free rpc_call_arg & deserialized arguments */ ! arg->rpc_call_arg = kmem_alloc(sizeof (*arg->rpc_call_arg), KM_SLEEP); /* deserialize arguments */ - bzero(arg->rpc_call_arg, sizeof (*arg->rpc_call_arg)); if (!SVC_GETARGS(rqst->rq_xprt, __xdr_rpc_gss_init_arg, (caddr_t)arg->rpc_call_arg)) { ret = RPCSEC_GSS_FAILED; client_data->stale = TRUE; goto error2; --- 955,967 ---- * taskq func must free arg. */ arg = kmem_alloc(sizeof (*arg), KM_SLEEP); /* taskq func must free rpc_call_arg & deserialized arguments */ ! arg->rpc_call_arg = kmem_zalloc(sizeof (*arg->rpc_call_arg), KM_SLEEP); /* deserialize arguments */ if (!SVC_GETARGS(rqst->rq_xprt, __xdr_rpc_gss_init_arg, (caddr_t)arg->rpc_call_arg)) { ret = RPCSEC_GSS_FAILED; client_data->stale = TRUE; goto error2;