]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/sp_tinfo.c
ncurses 6.0 - patch 20170513
[ncurses.git] / test / sp_tinfo.c
index 8e42ad32fdd508557d3962bb37f1d54bca8e219c..1c20588a4257d429ae2e8e3a4d4733784eab6fdd 100644 (file)
@@ -27,7 +27,7 @@
  ****************************************************************************/
 
 /*
- * $Id: sp_tinfo.c,v 1.17 2017/04/02 01:03:30 tom Exp $
+ * $Id: sp_tinfo.c,v 1.19 2017/05/13 23:19:04 tom Exp $
  *
  * TOTO: add option for non-sp-funcs interface
  */
@@ -74,7 +74,7 @@ initialize(const char *name, FILE *output)
     result->fp = output;
     result->name = name;
     result->outc = (fileno(output) == 1) ? my_outc : my_errc;
-    result->sp = opt_n ? 0 : new_prescr();
+    result->sp = opt_n ? NULL : new_prescr();
 
     if (opt_t) {
        char *temp = strdup(name);
@@ -267,7 +267,9 @@ cleanup(MYDATA * data)
 {
     set_curterm(data->term);
     del_curterm(data->term);
+#if !NO_LEAKS
     free(data->sp);            /* cannot use delscreen in tinfo */
+#endif
     free(data);
 }