From 599ccf8fb50febde09eae05dff329c215ad7e395 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 20 Dec 2014 00:55:21 +0000 Subject: [PATCH] -check malloc rval --- src/testspdy/test_new_connection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/testspdy/test_new_connection.c b/src/testspdy/test_new_connection.c index e4e2b2e2..c955b41b 100644 --- a/src/testspdy/test_new_connection.c +++ b/src/testspdy/test_new_connection.c @@ -149,6 +149,8 @@ static char* strcopy(const char *s, size_t len) { char *dst; dst = malloc(len+1); + if (NULL == dst) + abort (); memcpy(dst, s, len); dst[len] = '\0'; return dst;