diff options
author | Rajesh Amaravathi <rajesh@redhat.com> | 2012-05-02 10:31:27 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-05-02 07:24:39 -0700 |
commit | 69a946bfea058bd5f9776343d7ccc1864d4a81b8 (patch) | |
tree | eef4e7b84f5f8151da9c8296a423030b097d3fe4 /rpc | |
parent | 1c825e5f2498ec586c0e9123c472f6d134706e08 (diff) |
rpcsvc: size check before calloc in rpcsvc_handle_disconnect
Change-Id: Ib9e9e28b4fd3d68ebd4b5dcbd0ee4576217b9d4f
BUG: 782761
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/3257
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index f87338315af..5236c472627 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -553,6 +553,9 @@ rpcsvc_handle_disconnect (rpcsvc_t *svc, rpc_transport_t *trans) pthread_mutex_lock (&svc->rpclock); { + if (!svc->notify_count) + goto unlock; + wrappers = GF_CALLOC (svc->notify_count, sizeof (*wrapper), gf_common_mt_rpcsvc_wrapper_t); if (!wrappers) { |