Module Name: src
Committed By: wiz
Date: Mon Dec 21 09:17:37 UTC 2009
Modified Files:
src/bin/pax: sel_subs.c
Log Message:
Free pt in another error case.
Found by Henning Petersen using cppcheck, in PR 42488.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/bin/pax/sel_subs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/pax/sel_subs.c
diff -u src/bin/pax/sel_subs.c:1.21 src/bin/pax/sel_subs.c:1.22
--- src/bin/pax/sel_subs.c:1.21 Sun Apr 29 20:23:34 2007
+++ src/bin/pax/sel_subs.c Mon Dec 21 09:17:37 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sel_subs.c,v 1.21 2007/04/29 20:23:34 msaitoh Exp $ */
+/* $NetBSD: sel_subs.c,v 1.22 2009/12/21 09:17:37 wiz Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)sel_subs.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: sel_subs.c,v 1.21 2007/04/29 20:23:34 msaitoh Exp $");
+__RCSID("$NetBSD: sel_subs.c,v 1.22 2009/12/21 09:17:37 wiz Exp $");
#endif
#endif /* not lint */
@@ -404,6 +404,7 @@
default:
tty_warn(1, "Bad option %c with time range %s",
*flgpt, str);
+ (void)free((char *)pt);
goto out;
}
++flgpt;