]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add missing oom check
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jan 2022 01:20:31 +0000 (10:20 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 28 Jan 2022 12:56:29 +0000 (12:56 +0000)
Fixes CID#1469129.

src/resolve/test-resolved-stream.c

index fd7ade19d1e5c605aa1b474695d1aaf557bb0a14..50173389dd825e9ea462a2b703f09d1a0f7b8167 100644 (file)
@@ -130,7 +130,7 @@ static void *tls_dns_server(void *p) {
         assert_se(in_addr_to_string(SERVER_ADDRESS.sin_family,
                                     &(union in_addr_union){.in = SERVER_ADDRESS.sin_addr},
                                     &ip_str) >= 0);
-        asprintf(&bind_str, "%s:%d", ip_str, be16toh(SERVER_ADDRESS.sin_port));
+        assert_se(asprintf(&bind_str, "%s:%d", ip_str, be16toh(SERVER_ADDRESS.sin_port)) >= 0);
 
         /* We will hook one of the socketpair ends to OpenSSL's TLS server
          * stdin/stdout, so we will be able to read and write plaintext