]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
fopencookie.3: EXAMPLES: Fix memory leak
authorAlejandro Colomar <alx@kernel.org>
Thu, 26 Jan 2023 00:01:31 +0000 (01:01 +0100)
committerAlejandro Colomar <alx@kernel.org>
Thu, 26 Jan 2023 00:01:55 +0000 (01:01 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man3/fopencookie.3

index f3bad43987f3af1a5e7874e3f3a682514bb8042e..b3d3ebc72b18efd2b64ae7e777dff40d9a0dd0b3 100644 (file)
@@ -445,6 +445,8 @@ main(int argc, char *argv[])
         printf("/%.*s/\en", (int) nread, buf);
     }
 
+    free(mycookie.buf);
+
     exit(EXIT_SUCCESS);
 }
 .EE