summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ea9088)
raw | patch | inline | side by side (parent: 0ea9088)
author | Florian Forster <octo@collectd.org> | |
Sat, 23 Feb 2013 12:13:40 +0000 (13:13 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 23 Feb 2013 12:13:40 +0000 (13:13 +0100) |
src/utils_rrdcreate.c | patch | blob | history |
diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c
index 2228660ea750b417171bd830efd5bce649a5875d..33493bfd1545a06cbca4be7b23018da26b930493 100644 (file)
--- a/src/utils_rrdcreate.c
+++ b/src/utils_rrdcreate.c
status = pthread_attr_init (&attr);
if (status != 0)
+ {
+ srrd_create_args_destroy (args);
return (-1);
+ }
status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (status != 0)
+ {
+ pthread_attr_destroy (&attr);
+ srrd_create_args_destroy (args);
return (-1);
+ }
status = pthread_create (&thread, &attr, srrd_create_thread, args);
if (status != 0)
}
pthread_attr_destroy (&attr);
+ /* args is freed in srrd_create_thread(). */
return (0);
}