From 18358a08096aa2fc5847e3011fc9d7ccff6330d2 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 22 Mar 2006 16:44:30 +0000 Subject: [PATCH] Coverity CID 2582: Set variables to NULL after freeing. --- usr.sbin/sup/source/supmsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/sup/source/supmsg.c b/usr.sbin/sup/source/supmsg.c index ff3498178e8e..53f41613377d 100644 --- a/usr.sbin/sup/source/supmsg.c +++ b/usr.sbin/sup/source/supmsg.c @@ -1,4 +1,4 @@ -/* $NetBSD: supmsg.c,v 1.12 2006/03/22 16:42:41 christos Exp $ */ +/* $NetBSD: supmsg.c,v 1.13 2006/03/22 16:44:30 christos Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -626,6 +626,7 @@ msgrecv(int (*xferfile)(TREE *, va_list), ...) break; (void) Tinsert(&t->Tlink, linkname, FALSE); free(linkname); + linkname = NULL; x = readstring(&linkname); } t->Texec = NULL; @@ -636,6 +637,7 @@ msgrecv(int (*xferfile)(TREE *, va_list), ...) break; (void) Tinsert(&t->Texec, execcmd, FALSE); free(execcmd); + execcmd = NULL; x = readstring(&execcmd); } if (x == SCMOK)