From: yannick.brosseau@gmail.com (Yannick Brosseau)
Subject: [ltt-dev] [UST PATCH] Initialize _res_header variable to zero before use in process_client_cmd
Date: Tue, 22 Feb 2011 18:30:30 -0500 [thread overview]
Message-ID: <1298417430-30747-1-git-send-email-yannick.brosseau@gmail.com> (raw)
This use of a non-initialized variable was detected by the valgrind test.
Signed-off-by: Yannick Brosseau <yannick.brosseau at gmail.com>
---
libustconsumer/libustconsumer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libustconsumer/libustconsumer.c b/libustconsumer/libustconsumer.c
index 25c84ce..c51b106 100644
--- a/libustconsumer/libustconsumer.c
+++ b/libustconsumer/libustconsumer.c
@@ -621,7 +621,7 @@ static void process_client_cmd(int sock, struct ustcomm_header *req_header,
char *recvbuf, struct ustconsumer_instance *instance)
{
int result;
- struct ustcomm_header _res_header;
+ struct ustcomm_header _res_header = {0};
struct ustcomm_header *res_header = &_res_header;
struct ustcomm_buffer_info *buf_inf;
--
1.7.2.3
next reply other threads:[~2011-02-22 23:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 23:30 Yannick Brosseau [this message]
2011-02-23 9:11 ` Nils Carlson
2011-02-23 15:41 ` Mathieu Desnoyers
[not found] ` <BLU0-SMTP243E1ABCB7AA82363C368C96DB0@phx.gbl>
2011-02-23 16:04 ` Nils Carlson
2011-02-23 15:51 ` Mathieu Desnoyers
[not found] ` <BLU0-SMTP68D3FDFD4FBB093BB2E42B96DB0@phx.gbl>
2011-02-23 16:15 ` Nils Carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298417430-30747-1-git-send-email-yannick.brosseau@gmail.com \
--to=yannick.brosseau@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox