]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: Fixed potential segfault problem in test-http-client-errors.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 3 Nov 2016 20:06:27 +0000 (21:06 +0100)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 9 Nov 2016 12:28:06 +0000 (14:28 +0200)
Found by Coverity.

src/lib-http/test-http-client-errors.c

index a236c41c82c1023051457cfc947400734e2ee70e..2169ee949ea16ce1a2536703b972d69ed9620a6a 100644 (file)
@@ -1926,8 +1926,10 @@ test_dns_lookup_ttl_input(struct server_connection *conn)
                } else {
                        o_stream_nsend_str(conn->conn.output,
                                t_strdup_printf("%d\n", EAI_FAIL));
-                       if (count > 4)
+                       if (count > 4) {
                                server_connection_deinit(&conn);
+                               return;
+                       }
                }
                count++;
        }