name_new = malloc(sizeof(struct name_entry));
if (name_new == NULL)
return NULL;
-
+ memset(name_new, 0x00, sizeof(struct name_entry));
strlcpy(name_new->name, name, sizeof(name_new->name));
dbg("adding '%s'\n", name_new->name);
list_add_tail(&name_new->node, &name_loop->node);
name_new = malloc(sizeof(struct name_entry));
if (name_new == NULL)
return NULL;
-
+ memset(name_new, 0x00, sizeof(struct name_entry));
snprintf(name_new->name, sizeof(name_new->name), "%s=%s", key, value);
name_new->name[sizeof(name_new->name)-1] = '\0';
dbg("adding '%s'\n", name_new->name);