From: Philippe Proulx Date: Tue, 15 Mar 2016 21:12:14 +0000 (-0400) Subject: linux-fs: zero packet buffer initially X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=864a5cd4a34d5648d8bd26bc80a2b8bbf4de4ba7;p=deliverable%2Fbarectf.git linux-fs: zero packet buffer initially This fixes Valgrind warnings. Signed-off-by: Philippe Proulx --- diff --git a/platforms/linux-fs/barectf-platform-linux-fs.c b/platforms/linux-fs/barectf-platform-linux-fs.c index f2b3b9b..d91b474 100644 --- a/platforms/linux-fs/barectf-platform-linux-fs.c +++ b/platforms/linux-fs/barectf-platform-linux-fs.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -115,6 +116,8 @@ struct barectf_platform_linux_fs_ctx *barectf_platform_linux_fs_init( return NULL; } + memset(buf, 0, buf_size); + sprintf(stream_path, "%s/stream", trace_dir); ctx->fh = fopen(stream_path, "wb");