[nagiosplug] check_http: Use xasprintf instead of asprintf

"Nagios Plugin Development" <[email protected]> Sun, 18 Aug 2013 17:20:15 +0000
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 22519bced6235c1c6cdb81d59783dd8fe1208461
 Author: Holger Weiss <[email protected]>
   Date: Sun Aug 18 19:16:00 2013 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=22519bc

check_http: Use xasprintf instead of asprintf

---

 plugins/check_http.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/check_http.c b/plugins/check_http.c
index 56e87bb..ea7a673 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -1098,7 +1098,7 @@ check_http (void)
       if(output_header_search[sizeof(output_header_search)-1]!='\0') {
         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;
     }
   }


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk