From 5a61e826fa0de6a5987f06257199476f79d2473a Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 26 Feb 2013 20:51:34 +0000 Subject: [PATCH] afsmonitor: Check correct variable is non-NULL Before freeing curr_fsData, check that it is non-NULL, rather than checking prev_fsData in error. Caught by coverity (#985289) Change-Id: I8fb74ce0c4e447de65924f2afb6075213d839760 Reviewed-on: http://gerrit.openafs.org/9284 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/afsmonitor/afsmonitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afsmonitor/afsmonitor.c b/src/afsmonitor/afsmonitor.c index eee5936c6..953ba04b5 100644 --- a/src/afsmonitor/afsmonitor.c +++ b/src/afsmonitor/afsmonitor.c @@ -491,7 +491,7 @@ afsmon_Exit(int a_exitVal) /* exit code */ fprintf(debugFD, ", prev \n"); free(prev_fsData); } - if (prev_cmData != (struct cm_Display_Data *)0) { + if (curr_cmData != (struct cm_Display_Data *)0) { if (afsmon_debug) fprintf(debugFD, "Deallocating CM Print Buffers .... curr"); free(curr_cmData); -- 2.39.5