We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b55308 commit 94e86b1Copy full SHA for 94e86b1
tools/hv/hv_fcopy_uio_daemon.c
@@ -296,6 +296,13 @@ static int hv_fcopy_start(struct hv_start_fcopy *smsg_in)
296
file_name = (char *)malloc(file_size * sizeof(char));
297
path_name = (char *)malloc(path_size * sizeof(char));
298
299
+ if (!file_name || !path_name) {
300
+ free(file_name);
301
+ free(path_name);
302
+ syslog(LOG_ERR, "Can't allocate memory for file name and/or path name");
303
+ return HV_E_FAIL;
304
+ }
305
+
306
wcstoutf8(file_name, (__u16 *)in_file_name, file_size);
307
wcstoutf8(path_name, (__u16 *)in_path_name, path_size);
308
0 commit comments