summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libocurses/newwin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libocurses/newwin.c b/lib/libocurses/newwin.c
index 88480e2c8b2..e55f18b7414 100644
--- a/lib/libocurses/newwin.c
+++ b/lib/libocurses/newwin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newwin.c,v 1.4 2005/08/14 17:15:19 espie Exp $ */
+/* $OpenBSD: newwin.c,v 1.5 2009/11/11 18:22:05 deraadt Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -170,8 +170,8 @@ __makenew(nl, nc, by, bx, sub)
return NULL;
}
if ((win->lspace = malloc (nl * sizeof(__LINE))) == NULL) {
- free (win);
free (win->lines);
+ free (win);
return NULL;
}