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

2024-09-06 Thread Zhu Jun
Added error handling for memory allocation failures of file_name and path_name. Signed-off-by: Zhu Jun --- v1->v2: Add cleanup memory v2->v3: If we're calling exit() just 2 lines later, it doesn't make a lot of sense to call free(). free(NULL) is vali

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

2024-08-28 Thread Zhu Jun
Added error handling for memory allocation failures of file_name and path_name. Signed-off-by: Zhu Jun --- v1->v2: Add cleanup memory tools/hv/hv_fcopy_uio_daemon.c | 12 1 file changed, 12 insertions(+) diff --git a/tools/hv/hv_fcopy_uio_daemon.c b/tools

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

2024-08-28 Thread Zhu Jun
Added checks for `file_name` and `path_name` memory allocation failures, with error logging and process exit on failure. Signed-off-by: Zhu Jun --- tools/hv/hv_fcopy_uio_daemon.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/hv/hv_fcopy_uio_daemon.c b/tools/hv