BUG/MINOR: proxy: Missing calloc return value check in proxy_defproxy_cpy

A memory allocation failure happening in proxy_defproxy_cpy while
copying the default compression options would have resulted in a crash.
This function is called for every new proxy found while parsing the
configuration.

It was raised in GitHub issue #1233.
It could be backported to all stable branches.

(cherry picked from commit 18a82ba690a6ff4adbf9702cefa6dc89eb36372d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 4d8e20f83cc07c08c1d562e6afc5b4d3a54f4058)
[Cf: Patch applied on cfgparse-listen.c]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1c3a202760d998833edc6768f457628ee6d8beea)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 7dfdb88c59f0965627657f66afb3cf118db001f6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index df45a57..266ee96 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -594,6 +594,11 @@
 		/* default compression options */
 		if (defproxy.comp != NULL) {
 			curproxy->comp = calloc(1, sizeof(struct comp));
+			if (!curproxy->comp) {
+				ha_alert("parsing [%s:%d] : out of memory for default compression options", file, linenum);
+				err_code |= ERR_ALERT | ERR_ABORT;
+				goto out;
+			}
 			curproxy->comp->algos = defproxy.comp->algos;
 			curproxy->comp->types = defproxy.comp->types;
 		}