[4.1] e6bcbb3 Check malloc return

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Mon Sep 12 15:48:17 CEST 2016


commit e6bcbb354c57a91add3e89004ef17ffb79263b34
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Tue Aug 30 10:25:25 2016 +0200

    Check malloc return

diff --git a/lib/libvarnish/cli_common.c b/lib/libvarnish/cli_common.c
index 44a6869..d14611f 100644
--- a/lib/libvarnish/cli_common.c
+++ b/lib/libvarnish/cli_common.c
@@ -204,6 +204,7 @@ VCLI_ReadResult(int fd, unsigned *status, char **ptr, double tmo)
 
 		*status = u;
 		p = malloc(v + 1L);
+		AN(p);
 		if (p == NULL)
 			break;
 



More information about the varnish-commit mailing list