diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2007-12-17 10:19:21 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-12-18 11:11:55 -0800 |
commit | 03554590f8b5fcf673d424dd48d66dd465c27bed (patch) | |
tree | c8567cacc7aa8f8d191243401fc4dcb4fe139801 | |
parent | 2928d7724eef10fd770237af4b266ec59e9772f2 (diff) | |
download | libmlx4-03554590f8b5fcf673d424dd48d66dd465c27bed.tar.gz |
Clear context struct at allocation time
Future versions of libibverbs will add additional ops to the end of
struct ibv_context. This means that driver libraries should zero the
entire struct ibv_context at allocation time, so that any new ops will
be NULL by default.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | src/mlx4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -105,7 +105,7 @@ static struct ibv_context *mlx4_alloc_context(struct ibv_device *ibdev, int cmd_ struct mlx4_alloc_ucontext_resp resp; int i; - context = malloc(sizeof *context); + context = calloc(1, sizeof *context); if (!context) return NULL; |