summaryrefslogtreecommitdiff
path: root/usr.sbin/sup/source/supmsg.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-03-22 16:44:30 +0000
committerchristos <christos@NetBSD.org>2006-03-22 16:44:30 +0000
commit18358a08096aa2fc5847e3011fc9d7ccff6330d2 (patch)
tree8d2eb6d805b0c5f9e5203592be82a052c6462f85 /usr.sbin/sup/source/supmsg.c
parent17eb3e6ddda16dc71583bfb382999589a74fcb15 (diff)
Coverity CID 2582: Set variables to NULL after freeing.
Diffstat (limited to 'usr.sbin/sup/source/supmsg.c')
-rw-r--r--usr.sbin/sup/source/supmsg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/sup/source/supmsg.c b/usr.sbin/sup/source/supmsg.c
index ff3498178e8..53f41613377 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)