diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-11 18:22:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-11-11 18:22:06 +0000 |
commit | a0439fb51a46e00cee30956c3dc78b94fb9a6ec3 (patch) | |
tree | a807dddd1f4dc829b1b37af5715fddd6ba6c278d /lib | |
parent | 8888c391f2fe5c6b70f99848ce8e5f9a70ba89f3 (diff) |
obvious use after free, found by parfait
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libocurses/newwin.c | 4 |
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; } |