From 9ab533ff86dbf914b47228a9326fefd9ba04c65f Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Wed, 17 Dec 2014 13:19:00 +0530 Subject: protocol/client: Prevent "Dereference after NULL check" errors. Fixes 46 defects marked as "Dereference after NULL check" errors in coverity scan for client xlator. Change-Id: I0b4c991a3995ce74d7885fc5470ec7f5c589b411 BUG: 789278 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/9287 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Niels de Vos --- xlators/protocol/client/src/client.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/protocol/client/src') diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h index 69f77570cd0..b4809310939 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -57,6 +57,8 @@ typedef enum { } while (0) #define CLIENT_STACK_UNWIND(op, frame, params ...) do { \ + if (!frame) \ + break; \ clnt_local_t *__local = frame->local; \ frame->local = NULL; \ STACK_UNWIND_STRICT (op, frame, params); \ -- cgit