glusterd/vol_locks: Dereference ctx->dict, only if ctx != NULL

Change-Id: I7f753aff197fe08fad255fc75d7f88d2a4632de8
BUG: 1100325
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7849
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>