Code

plugin.c: fix potential null pointer dereference
[collectd.git] / src / write_http.c
index 9a4051176bf9c40bba5c9f877d838727f9c17283..8dd37c45ad189e2dfbf4265410d37a5b96382bb6 100644 (file)
@@ -240,7 +240,7 @@ static int wh_flush_nolock (cdtime_t timeout, wh_callback_t *cb) /* {{{ */
 
         if (cb->format == WH_FORMAT_COMMAND)
         {
-                if (cb->send_buffer_fill <= 0)
+                if (cb->send_buffer_fill == 0)
                 {
                         cb->send_buffer_init_time = cdtime ();
                         return (0);