Kaynağa Gözat

check_http: Use xasprintf instead of asprintf

Holger Weiss 12 yıl önce
ebeveyn
işleme
22519bced6
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      plugins/check_http.c

+ 1 - 1
plugins/check_http.c

@@ -1098,7 +1098,7 @@ check_http (void)
       if(output_header_search[sizeof(output_header_search)-1]!='\0') {
       if(output_header_search[sizeof(output_header_search)-1]!='\0') {
         bcopy("...",&output_header_search[sizeof(output_header_search)-4],4);
         bcopy("...",&output_header_search[sizeof(output_header_search)-4],4);
       }
       }
-      asprintf (&msg, _("%sheader '%s' not found on '%s://%s:%d%s', "), msg, output_header_search, use_ssl ? "https" : "http", host_name ? host_name : server_address, server_port, server_url);
+      xasprintf (&msg, _("%sheader '%s' not found on '%s://%s:%d%s', "), msg, output_header_search, use_ssl ? "https" : "http", host_name ? host_name : server_address, server_port, server_url);
       result = STATE_CRITICAL;
       result = STATE_CRITICAL;
     }
     }
   }
   }