diff lwlib/lw_stringlist.c @ 429:33c5bc04ea67

Fixed unitialized memory in lw_stringlist_create()
author lost@l-w.ca
date Sun, 19 Sep 2010 12:32:52 -0600
parents 80826bf2827b
children
line wrap: on
line diff
--- a/lwlib/lw_stringlist.c	Sun Sep 19 12:04:12 2010 -0600
+++ b/lwlib/lw_stringlist.c	Sun Sep 19 12:32:52 2010 -0600
@@ -30,7 +30,15 @@
 
 lw_stringlist_t lw_stringlist_create(void)
 {
-	return lw_alloc(sizeof(struct lw_stringlist_priv));
+	lw_stringlist_t s;
+	
+	
+	s = lw_alloc(sizeof(struct lw_stringlist_priv));
+	s -> strings = NULL;
+	s -> nstrings = 0;
+	s -> cstring = 0;
+	
+	return s;
 }
 
 void lw_stringlist_destroy(lw_stringlist_t S)