From 600a182b2f9837d6054a45268a895f0922e5dd15 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 26 Mar 2006 22:15:21 +0000 Subject: [PATCH] Coverity CID 2607: Although use after free is impossible here, clarify code. --- gnu/usr.bin/rcs/rcsclean/rcsclean.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gnu/usr.bin/rcs/rcsclean/rcsclean.c b/gnu/usr.bin/rcs/rcsclean/rcsclean.c index e2e8e0cc09dc..f8d197aa3d28 100644 --- a/gnu/usr.bin/rcs/rcsclean/rcsclean.c +++ b/gnu/usr.bin/rcs/rcsclean/rcsclean.c @@ -1,4 +1,4 @@ -/* $NetBSD: rcsclean.c,v 1.4 1996/10/15 07:00:38 veego Exp $ */ +/* $NetBSD: rcsclean.c,v 1.5 2006/03/26 22:15:21 christos Exp $ */ /* Clean up working files. */ @@ -323,11 +323,14 @@ get_directory(dirname, aargv) efaterror(dirname); if (chars) a = trealloc(char, a, chars); - else + else { tfree(a); + a = NULL; + } *aargv = p = tnalloc(char*, entries+1); - for (i=0; i