X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fcookies.c;h=07cfdc8ad14721b2353420424502cac6e041748c;hp=6d46123a20046f021d7ced507216391bff61a518;hb=5f0a2b3f0846dd4c2f72fc62e7171200d1fd6e06;hpb=370ff7a57640ff98cc399317927e8f3c51abad76 diff --git a/src/cookies.c b/src/cookies.c index 6d46123a..07cfdc8a 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -90,7 +90,7 @@ time_t cookies_now; struct cookie_jar * cookie_jar_new (void) { - struct cookie_jar *jar = xmalloc (sizeof (struct cookie_jar)); + struct cookie_jar *jar = xnew (struct cookie_jar); jar->chains = make_nocase_string_hash_table (0); jar->cookie_count = 0; return jar; @@ -130,8 +130,7 @@ struct cookie { static struct cookie * cookie_new (void) { - struct cookie *cookie = xmalloc (sizeof (struct cookie)); - memset (cookie, '\0', sizeof (struct cookie)); + struct cookie *cookie = xnew0 (struct cookie); /* Both cookie->permanent and cookie->expiry_time are now 0. By default, we assume that the cookie is non-permanent and valid