aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jean-François Rameau <jf.rameau@gmail.com> 2018-06-01 18:18:31 +0200
committerGravatar Sven Nierlein <sven@nierlein.de> 2018-10-22 16:30:31 +0200
commit30bb78e6815ac920eb7b0e157655add49dbe1794 (patch)
tree03954806ee4fc2f7c39214be0629bfcfa7a88747
parent92bab06a45c169c6118a752e70fb180707b5bd1e (diff)
downloadmonitoring-plugins-30bb78e6815ac920eb7b0e157655add49dbe1794.tar.gz
Avoid working with free'ed memory
-rw-r--r--plugins/check_curl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 4141b326..715af431 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -1920,11 +1920,11 @@ curlhelp_parse_statusline (const char *buf, curlhelp_statusline *status_line)
/* Human readable message: "Not Found" CRLF */
- free( first_line_buf );
p = strtok( NULL, "" );
if( p == NULL ) { free( status_line->first_line ); return -1; }
status_line->msg = status_line->first_line + ( p - first_line_buf );
-
+ free( first_line_buf );
+
return 0;
}