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);
ssnprintf (errbuf, sizeof (errbuf),
"lt_dlopen (\"%s\") failed: %s. "
- "The most common cause for this problem are "
+ "The most common cause for this problem is "
"missing dependencies. Use ldd(1) to check "
"the dependencies of the plugin "
"/ shared object.",
const char *dir;
char filename[BUFSIZE] = "";
char typename[BUFSIZE];
- int typename_len;
int ret;
struct stat statbuf;
struct dirent *de;
WARNING ("plugin_load: Filename too long: \"%s.so\"", plugin_name);
return (-1);
}
- typename_len = strlen (typename);
if ((dh = opendir (dir)) == NULL)
{
while ((de = readdir (dh)) != NULL)
{
- if (strncasecmp (de->d_name, typename, typename_len))
+ if (strcasecmp (de->d_name, typename))
continue;
status = ssnprintf (filename, sizeof (filename),
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);
}