summaryrefslogtreecommitdiffstats
path: root/libnetdata
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2023-02-21 09:53:03 +0200
committerGitHub <noreply@github.com>2023-02-21 09:53:03 +0200
commitbde40023ed79c9f6ee42dbd85ab92b2ba2e1fa70 (patch)
treedf56666b50e9559e596d86e639bce59041ccc888 /libnetdata
parentf1f6f4e197658c7f038966b6d6272366ca52ee80 (diff)
Fix coverity issues (#14543)
* Fix coverity 383236: Resource leak * Fix coverity 382915 : Logically dead code * Fix coverity 379133 : Division or modulo by float zero * Fix coverity 382783 : Copy into fixed size buffer * Fix coverity 381151 : Missing unlock * Fix coverity 381903 : Dereference after null check
Diffstat (limited to 'libnetdata')
-rw-r--r--libnetdata/buffer/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libnetdata/buffer/buffer.c b/libnetdata/buffer/buffer.c
index 6e27bcc79e..ab79a82c52 100644
--- a/libnetdata/buffer/buffer.c
+++ b/libnetdata/buffer/buffer.c
@@ -495,6 +495,7 @@ int buffer_unittest(void) {
buffer_json_finalize(wb);
errors += buffer_expect(wb, "{\n \"hello\":\"world\",\n \"alpha\":\"this: \\\" is a double quote\",\n \"object1\":{\n \"hello\":\"world\"\n }\n}\n");
+ buffer_free(wb);
return errors;
}