Mercurial > hg-old > index.cgi
changeset 429:33c5bc04ea67
Fixed unitialized memory in lw_stringlist_create()
author | lost@l-w.ca |
---|---|
date | Sun, 19 Sep 2010 12:32:52 -0600 |
parents | 637f46c5b2b7 |
children | 4bcb763bddde |
files | lwlib/lw_stringlist.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
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)