projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
collectctl: remove dead code
[collectd.git]
/
src
/
zone.c
diff --git
a/src/zone.c
b/src/zone.c
index
19eaea7
..
0e9fee3
100644
(file)
--- a/
src/zone.c
+++ b/
src/zone.c
@@
-81,7
+81,7
@@
zone_read_procfile(char const *pidstr, char const *name, void *buf, size_t bufsi
if (sread(fd, buf, bufsize) != 0) {
char errbuf[1024];
ERROR ("zone plugin: Reading \"%s\" failed: %s", procfile,
if (sread(fd, buf, bufsize) != 0) {
char errbuf[1024];
ERROR ("zone plugin: Reading \"%s\" failed: %s", procfile,
- strerror (errno, errbuf, sizeof (errbuf)));
+ s
s
trerror (errno, errbuf, sizeof (errbuf)));
close(fd);
return (1);
}
close(fd);
return (1);
}
@@
-115,12
+115,13
@@
zone_find_stats(c_avl_tree_t *tree, zoneid_t zoneid)
zoneid_t *key = NULL;
if (c_avl_get(tree, (void **)&zoneid, (void **)&ret)) {
zoneid_t *key = NULL;
if (c_avl_get(tree, (void **)&zoneid, (void **)&ret)) {
- if (!(ret = malloc(sizeof(
zone_stats_
t)))) {
+ if (!(ret = malloc(sizeof(
*re
t)))) {
WARNING("zone plugin: no memory");
return(NULL);
}
WARNING("zone plugin: no memory");
return(NULL);
}
- if (!(key = malloc(sizeof(
zoneid_t
)))) {
+ if (!(key = malloc(sizeof(
*key
)))) {
WARNING("zone plugin: no memory");
WARNING("zone plugin: no memory");
+ free(ret);
return(NULL);
}
*key = zoneid;
return(NULL);
}
*key = zoneid;