X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.c;h=bbf6144d1fa35fcc45c7e0d4c3bfcfa5d41971ea;hb=6777942b404dced12f9e7b11031bb87252c13ca2;hp=c2017acad204f582874b606cfcff61ef75ea3f47;hpb=3548bea8b944215e162132c8ba6f1fa557941736;p=collectd.git diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index c2017aca..bbf6144d 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -320,7 +320,6 @@ static void log_list_callbacks(llist_t **list, /* {{{ */ int i; llentry_t *le; int n; - char **keys; n = llist_size(*list); if (n == 0) { @@ -328,11 +327,9 @@ static void log_list_callbacks(llist_t **list, /* {{{ */ return; } - keys = calloc(n, sizeof(char *)); - + char **keys = calloc(n, sizeof(*keys)); if (keys == NULL) { ERROR("%s: failed to allocate memory for list of callbacks", comment); - return; }