Initialize _res_header variable to zero before use in process_client_cmd
authorYannick Brosseau <yannick.brosseau@gmail.com>
Tue, 22 Feb 2011 23:30:30 +0000 (00:30 +0100)
committerNils Carlson <nils.carlson@ericsson.com>
Wed, 23 Feb 2011 09:08:50 +0000 (10:08 +0100)
This use of a non-initialized variable was detected by the valgrind test.

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Acked-by: Nils Carlson <nils.carlson@ericsson.com>
libustconsumer/libustconsumer.c

index 25c84ce0c48d36b20ef6369e8f0a60d5a2508293..c51b1066b84e138158c150e73f4a41947687bea7 100644 (file)
@@ -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;
 
This page took 0.026266 seconds and 4 git commands to generate.