From 649e4378ad8e3a08f24322ea7c44a3903a6a6ce4 Mon Sep 17 00:00:00 2001 From: Harpreet Lalwani Date: Tue, 18 Sep 2018 12:31:02 +0530 Subject: Quota: NULL pointer dereferencing clang Fix Added ternary operator to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I903ec1973fd4bb6473d16e2680bd86ac3a20e093 Signed-off-by: Harpreet Lalwani --- xlators/features/quota/src/quotad-aggregator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/features/quota/src/quotad-aggregator.c b/xlators/features/quota/src/quotad-aggregator.c index d30b8cdedfc..b9c18f40f4b 100644 --- a/xlators/features/quota/src/quotad-aggregator.c +++ b/xlators/features/quota/src/quotad-aggregator.c @@ -283,7 +283,8 @@ errx: int quotad_aggregator_lookup_cbk(xlator_t *this, call_frame_t *frame, void *rsp) { - quotad_aggregator_submit_reply(frame, frame->local, rsp, NULL, 0, NULL, + quotad_aggregator_submit_reply(frame, frame ? frame->local : NULL, rsp, + NULL, 0, NULL, (xdrproc_t)xdr_gfs3_lookup_rsp); return 0; -- cgit