X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_forms.c;fp=test%2Fdemo_forms.c;h=cbfc64b4db9613fad2eaf927e5a4e653bbb67cf7;hp=5940e796a305674c2af0b5c4b2a0df1f6d10d674;hb=26522e4669dbf45cba32138b5d81c6c292e88e60;hpb=18865150079f74b17047633094e3994516af8a41 diff --git a/test/demo_forms.c b/test/demo_forms.c index 5940e796..cbfc64b4 100644 --- a/test/demo_forms.c +++ b/test/demo_forms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2003-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 2003-2008,2009 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_forms.c,v 1.31 2008/12/20 19:23:00 tom Exp $ + * $Id: demo_forms.c,v 1.32 2009/05/30 16:52:42 tom Exp $ * * Demonstrate a variety of functions from the form library. * Thomas Dickey - 2003/4/26 @@ -451,8 +451,11 @@ demo_forms(void) free_form(form); } - for (c = 0; f[c] != 0; c++) + for (c = 0; f[c] != 0; c++) { + void *ptr = field_userptr(f[c]); + free(ptr); free_field(f[c]); + } noraw(); nl();