diff options
author | Soumya Koduri <skoduri@redhat.com> | 2016-05-24 17:42:06 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2016-05-24 11:20:01 -0700 |
commit | ac2fa110ea489ca3d1b81e3872731fa1621a6e39 (patch) | |
tree | 45d9732cf8123cbc263a23f1f814f6517572f825 /api/src/glfs-handleops.c | |
parent | 02b2750ecc35f88c3262015b401dda962381f9da (diff) |
gfapi/upcall: Use GF_CALLOC while allocating variables
In 'glfs_h_poll_cache_invalidation', use GF_CALLOC to allocate
'up_inode_arg' to set memory accounting which is used/referred when
freeing the same variable in case of any erros.
Change-Id: I365e114fa6d7abb292dacb6fc702128d046df8f8
BUG: 1339214
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/14521
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'api/src/glfs-handleops.c')
-rw-r--r-- | api/src/glfs-handleops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index 721187f8342..af58691bd8b 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -1901,7 +1901,8 @@ glfs_h_poll_cache_invalidation (struct glfs *fs, goto out; } - up_inode_arg = calloc (1, sizeof (struct callback_inode_arg)); + up_inode_arg = GF_CALLOC (1, sizeof (struct callback_inode_arg), + glfs_mt_upcall_entry_t); GF_VALIDATE_OR_GOTO ("glfs_h_poll_cache_invalidation", up_inode_arg, out); |