[master] e53414140 Assert on malloc to succeed
Nils Goroll
nils.goroll at uplex.de
Sat Apr 4 11:12:11 UTC 2020
commit e53414140973820dca9e96d42f29f005599de4dd
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sat Apr 4 12:34:26 2020 +0200
Assert on malloc to succeed
This ticks off an XXX comment: We basically assert on malloc to succeed
everywhere, so we should stick with it here, too.
diff --git a/lib/libvarnish/vsa.c b/lib/libvarnish/vsa.c
index 31703c547..a2cab79df 100644
--- a/lib/libvarnish/vsa.c
+++ b/lib/libvarnish/vsa.c
@@ -248,11 +248,7 @@ VSA_Malloc(const void *s, unsigned sal)
void *d;
d = malloc(vsa_suckaddr_len);
- /* XXX: shouldn't we AN(sua) instead of mixing up failed allocations
- * with unsupported address family or bogus sockaddr?
- */
- if (d == NULL)
- return (NULL);
+ AN(d);
return (VSA_Build(d, s, sal));
}
More information about the varnish-commit
mailing list