# HG changeset patch # User lost@l-w.ca # Date 1284921172 21600 # Node ID 33c5bc04ea672d3aeb57905d61caf2b51efc634d # Parent 637f46c5b2b74f4834038684cef7de77ca4e63bc Fixed unitialized memory in lw_stringlist_create() diff -r 637f46c5b2b7 -r 33c5bc04ea67 lwlib/lw_stringlist.c --- 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)