@cryptotaxi247 / netdata-1 / commits / 15cf94350

fixed memory leaks identified by coverity

Costa Tsaousis (ktsaou) committed Aug 1, 2017 at 22:40 UTC 15cf9435036f09648393c85a27ebfcb820af8d73
2 files changed +4
src/cgroup-network.c
+2
@@ -77,6 +77,8 @@ struct iface *read_proc_net_dev(const char *prefix) {
77 root = t;
78 }
79
80 + procfile_close(ff);
81 +
82 return root;
83 }
84
src/unit_test.c
+2
@@ -290,10 +290,12 @@ int unit_test_buffer() {
290 fprintf(stderr, "\nstring : %s (length %zu)\n", string, strlen(string));
291 fprintf(stderr, "\nbuffer : %s (length %zu)\n", s, buffer_strlen(wb));
292 fprintf(stderr, "\nexpected: %s (length %zu)\n", final, strlen(final));
293 + buffer_free(wb);
294 return -1;
295 }
296
297 fprintf(stderr, "buffer_sprintf() works as expected.\n");
298 + buffer_free(wb);
299 return 0;
300 }
301