while (42)
{
- callback_func_t *cf;
+ read_func_t *rf;
- cf = c_heap_get_root (read_heap);
- if (cf == NULL)
+ rf = c_heap_get_root (read_heap);
+ if (rf == NULL)
break;
-
- destroy_callback (cf);
+ sfree (rf->rf_name);
+ destroy_callback ((callback_func_t *) rf);
}
c_heap_destroy (read_heap);
rf->rf_interval = plugin_get_interval ();
status = plugin_insert_read (rf);
- if (status != 0)
+ if (status != 0) {
+ sfree (rf->rf_name);
sfree (rf);
+ }
return (status);
} /* int plugin_register_read */
rf->rf_ctx = plugin_get_ctx ();
status = plugin_insert_read (rf);
- if (status != 0)
+ if (status != 0) {
+ sfree (rf->rf_name);
sfree (rf);
+ }
return (status);
} /* int plugin_register_complex_read */
write_threads_num = 5;
}
- start_write_threads ((size_t) write_threads_num);
-
if ((list_init == NULL) && (read_heap == NULL))
return;
le = le->next;
}
+ start_write_threads ((size_t) write_threads_num);
+
/* Start read-threads */
if (read_heap != NULL)
{
return_status = -1;
}
+ sfree (rf->rf_name);
destroy_callback ((void *) rf);
}