diff options
author | Jean-François Rameau <jf.rameau@gmail.com> | 2018-06-01 16:18:31 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2018-10-22 14:30:31 (GMT) |
commit | 30bb78e6815ac920eb7b0e157655add49dbe1794 (patch) | |
tree | 03954806ee4fc2f7c39214be0629bfcfa7a88747 /plugins/check_curl.c | |
parent | 92bab06a45c169c6118a752e70fb180707b5bd1e (diff) | |
download | monitoring-plugins-30bb78e6815ac920eb7b0e157655add49dbe1794.tar.gz |
Avoid working with free'ed memory
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r-- | plugins/check_curl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 4141b32..715af43 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) | |||
1920 | 1920 | ||
1921 | /* Human readable message: "Not Found" CRLF */ | 1921 | /* Human readable message: "Not Found" CRLF */ |
1922 | 1922 | ||
1923 | free( first_line_buf ); | ||
1924 | p = strtok( NULL, "" ); | 1923 | p = strtok( NULL, "" ); |
1925 | if( p == NULL ) { free( status_line->first_line ); return -1; } | 1924 | if( p == NULL ) { free( status_line->first_line ); return -1; } |
1926 | status_line->msg = status_line->first_line + ( p - first_line_buf ); | 1925 | status_line->msg = status_line->first_line + ( p - first_line_buf ); |
1927 | 1926 | free( first_line_buf ); | |
1927 | |||
1928 | return 0; | 1928 | return 0; |
1929 | } | 1929 | } |
1930 | 1930 | ||