]> granicus.if.org Git - apache/commitdiff
* support/ab.c (test): Catch more calloc failures.
authorJoe Orton <jorton@apache.org>
Thu, 17 Mar 2011 16:42:16 +0000 (16:42 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 17 Mar 2011 16:42:16 +0000 (16:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082586 13f79535-47bb-0310-9956-ffa450edef68

support/ab.c

index 75c514680fdfb084f953d1a90a33c82c4a13d6fd..59461dd53b5e2f9d62674a77fd6d5351cdf521a9 100644 (file)
@@ -1606,7 +1606,7 @@ static void test(void)
      * XXX: would be nice.
      */
     stats = calloc(requests, sizeof(struct data));
-    if (stats == NULL) {
+    if (stats == NULL || con == NULL) {
        err("Cannot allocate memory for result statistics");
     }