Re: [PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants

2021-03-16 Thread Stefan Hajnoczi
On Mon, Mar 15, 2021 at 12:46:29PM +0200, Mahmoud Mandour wrote: > On Mon, Mar 15, 2021 at 12:01 PM Stefan Hajnoczi > wrote: > > > On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote: > > > @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct > > fuse_session *se) > >

Re: [PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants

2021-03-15 Thread Mahmoud Mandour
On Mon, Mar 15, 2021 at 12:01 PM Stefan Hajnoczi wrote: > On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote: > > @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct > fuse_session *se) > > { > > struct fuse_req *req; > > > > -req = (struct fuse_req *)callo

Re: [PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants

2021-03-15 Thread Stefan Hajnoczi
On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote: > @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct > fuse_session *se) > { > struct fuse_req *req; > > -req = (struct fuse_req *)calloc(1, sizeof(struct fuse_req)); > +req = g_try_new(struct fuse_r

[PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants

2021-03-13 Thread Mahmoud Mandour
Changed calls to malloc(), calloc(), and realloc() with their equivalent allocation functions in GLib, and replaced their respective free() calls with g_free(). Allocation and deallocation of fuse_req structs, fuse_pollhandle structs, fuse_session structs and many local variables are now establish