Skip to content

Commit

Permalink
tools: hv: fcopy: set 'error' in case an unknown operation was requested
Browse files Browse the repository at this point in the history
'error' variable is left uninitialized in case we see an unknown operation.
As we don't immediately return and proceed to pwrite() we need to set it
to something, HV_E_FAIL sounds good enough.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
vittyvk authored and gregkh committed Sep 30, 2018
1 parent 34bd283 commit c2d68af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/hv/hv_fcopy_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ int main(int argc, char *argv[])
break;

default:
error = HV_E_FAIL;
syslog(LOG_ERR, "Unknown operation: %d",
buffer.hdr.operation);

Expand Down

0 comments on commit c2d68af

Please sign in to comment.