X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fplugin.c;h=a5c6c527f1b534325f537567abb6f147db11e49a;hb=2f0bd3ba78bdbfb6a1a5a1252573e5815ce3fb0b;hp=d185ef2fb3d6c0be41e861ffe4baed6bb5f8de6e;hpb=45aa6a65c24e38c0a3fa3880a300fbb02db50486;p=collectd.git diff --git a/src/plugin.c b/src/plugin.c index d185ef2f..a5c6c527 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -196,14 +196,12 @@ static int register_callback (llist_t **list, /* {{{ */ static int create_register_callback (llist_t **list, /* {{{ */ const char *name, void *callback, user_data_t *ud) { - char *key; callback_func_t *cf; cf = (callback_func_t *) malloc (sizeof (*cf)); if (cf == NULL) { ERROR ("plugin: create_register_callback: malloc failed."); - sfree (key); return (-1); } memset (cf, 0, sizeof (*cf)); @@ -404,6 +402,8 @@ static void stop_read_threads (void) if (read_threads == NULL) return; + INFO ("collectd: Stopping %i read threads.", read_threads_num); + pthread_mutex_lock (&read_lock); read_loop = 0; DEBUG ("plugin: stop_read_threads: Signalling `read_cond'");