On Wed, Apr 07, 2010 at 10:12:44AM -0700, Sean Hefty wrote:
> Signed-off-by: Sean Hefty <sean.he...@intel.com>
> 
>  src/cma.c |    6 ++----
>  src/cma.h |   10 ++++++++++
>  2 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/src/cma.c b/src/cma.c
> index a85448b..4025aeb 100644
> +++ b/src/cma.c
> @@ -342,11 +342,10 @@ static struct cma_id_private *ucma_alloc_id(struct 
> rdma_event_channel *channel,
>  {
>       struct cma_id_private *id_priv;
>  
> -     id_priv = malloc(sizeof *id_priv);
> +     id_priv = zalloc(sizeof *id_priv);
>       if (!id_priv)
>               return NULL;

Maybe use calloc(,1 sizeof(x)); instead?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to