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.
2 parents e0d2469 + 057489d commit 1f3afa5Copy full SHA for 1f3afa5
qga/commands.c
@@ -402,7 +402,7 @@ GuestExec *qmp_guest_exec(const char *path,
402
GIOChannel *in_ch, *out_ch, *err_ch;
403
GSpawnFlags flags;
404
bool has_output = (has_capture_output && capture_output);
405
- uint8_t *input = NULL;
+ g_autofree uint8_t *input = NULL;
406
size_t ninput = 0;
407
408
arglist.value = (char *)path;
@@ -441,7 +441,7 @@ GuestExec *qmp_guest_exec(const char *path,
441
g_child_watch_add(pid, guest_exec_child_watch, gei);
442
443
if (has_input_data) {
444
- gei->in.data = input;
+ gei->in.data = g_steal_pointer(&input);
445
gei->in.size = ninput;
446
#ifdef G_OS_WIN32
447
in_ch = g_io_channel_win32_new_fd(in_fd);
0 commit comments