From 4543bc6192c6ee85de3672475538adf63560a90f Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 31 Mar 2018 18:08:02 -0600 Subject: [PATCH] libtt/process.c: coverity CID 87051; use after free --- cde/lib/tt/bin/ttauth/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cde/lib/tt/bin/ttauth/process.c b/cde/lib/tt/bin/ttauth/process.c index d91330c8..1a217182 100644 --- a/cde/lib/tt/bin/ttauth/process.c +++ b/cde/lib/tt/bin/ttauth/process.c @@ -1302,11 +1302,12 @@ do_add(char *inputfilename, int lineno, int argc, char *argv[]) entry->protocol_name = copystring (protoname); entry->protocol_data_length = protodata_len; entry->protocol_data = protodata; + /* Avoid a double free later on in the event of an error */ + protodata = NULL; entry->network_id = copystring (netid); entry->auth_name = copystring (authname); entry->auth_data_length = authdata_len; entry->auth_data = authdata; - /* Avoid a double free later on in the event of an error */ authdata = NULL; -- 2.25.1