On Fri, Mar 18, 2016 at 3:05 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote:
> On Thu, Mar 17, 2016 at 11:50:15PM +0100, Paolo Bonzini wrote: > > > > > > On 17/03/2016 16:31, Pooja Dhannawat wrote: > > > > > > > > > On Thu, Mar 17, 2016 at 8:20 PM, Stefan Hajnoczi <stefa...@gmail.com > > > <mailto:stefa...@gmail.com>> wrote: > > > > > > On Tue, Mar 15, 2016 at 09:29:58PM +0530, Pooja Dhannawat wrote: > > > > @@ -170,8 +170,8 @@ static void net_socket_send(void *opaque) > > > > s->index = 0; > > > > s->packet_len = 0; > > > > s->nc.link_down = true; > > > > - memset(s->buf, 0, sizeof(s->buf)); > > > > > > This change is unrelated to allocating buf1 on the heap. What is > the > > > purpose of this line? > > > > > > > > > I moved buf from stack to Heap, used g_new(), but I got your point if > we > > > need to initialize it with 0 then I have to keep that one. > > > > > > Other wise doing so it gets whatever garbage it has already. > > > > This is s->buf, not buf. > > Exactly, they are different variables. > > Yes. The line should not be removed. Extremely sorry for the noise and my terrible confusion. Will mail the updated patch. > Stefan >