Re: [PATCH v2] tools/hv: Add memory allocation check in hv_fcopy_start

2024-09-06 Thread Saurabh Singh Sengar
On Sat, Sep 07, 2024 at 12:49:59AM +, Dexuan Cui wrote: > > From: Saurabh Singh Sengar > > Sent: Wednesday, September 4, 2024 10:21 PM > > [...] > > hv_fcopy_send_data is the parent function which calls hv_fcopy_start. > > Possibly a good solution is to check the return value from > > hv_fcop

RE: [PATCH v2] tools/hv: Add memory allocation check in hv_fcopy_start

2024-09-06 Thread Dexuan Cui
> From: Saurabh Singh Sengar > Sent: Wednesday, September 4, 2024 10:21 PM > [...] > hv_fcopy_send_data is the parent function which calls hv_fcopy_start. > Possibly a good solution is to check the return value from > hv_fcopy_send_data The return value of hv_fcopy_send_data() is saved into icms

Re: [PATCH v2] tools/hv: Add memory allocation check in hv_fcopy_start

2024-09-04 Thread Saurabh Singh Sengar
On Sat, Aug 31, 2024 at 12:34:43AM +, Dexuan Cui wrote: > > From: Zhu Jun > > Sent: Wednesday, August 28, 2024 7:45 PM > > @@ -296,6 +296,18 @@ static int hv_fcopy_start(struct hv_start_fcopy > > *smsg_in) > > file_name = (char *)malloc(file_size * sizeof(char)); > > path_name

RE: [PATCH v2] tools/hv: Add memory allocation check in hv_fcopy_start

2024-08-30 Thread Dexuan Cui
> From: Zhu Jun > Sent: Wednesday, August 28, 2024 7:45 PM > @@ -296,6 +296,18 @@ static int hv_fcopy_start(struct hv_start_fcopy > *smsg_in) > file_name = (char *)malloc(file_size * sizeof(char)); > path_name = (char *)malloc(path_size * sizeof(char)); > > +if (!file_name) {