summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/globals.h
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-05-31 22:29:11 +0200
committerNiels de Vos <ndevos@redhat.com>2015-06-03 12:50:56 -0700
commitb8b59fea7822f9ab1e10d7a3f730354fe82a6097 (patch)
treeb6fead790f3ee1232de48e5bbd0bcdc2d4f1a042 /libglusterfs/src/globals.h
parent0209b18fd65f9df5ebd0a8764ebf864d0d392998 (diff)
nfs: allocate and return the hashkey for the auth_cache_entry
The allocation of the hashkey was never returned to the calling function. Allocating it with alloca() puts it on the stack, returning from the function makes the pointer invalid. Functions that are annotated with "inline" and call alloca(), will not always be inlined. Returning a pointer allocated with alloca() is in those cases not correct. One such confirmation was provided by GCC developer Alexandre Oliva: - http://gcc.gnu.org/ml/gcc-help/2004-04/msg00158.html It is more correct to call GF_MALLOC() and GF_FREE() for the hashkey. If this would result in preformance hit, we can always think of using alloca() again and turn make_hashkey() into a macro (yuck). Change-Id: Ia86a1f79d33240af4713bfb92f702b0ee6e87eb7 BUG: 1226714 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11019 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'libglusterfs/src/globals.h')
0 files changed, 0 insertions, 0 deletions