mbox series

[v2,0/4] qemu-ga: Fix some potential issues find by coverity

Message ID 20241021132839.463255-1-demeng@redhat.com (mailing list archive)
Headers show
Series qemu-ga: Fix some potential issues find by coverity | expand

Message

Dehan Meng Oct. 21, 2024, 1:28 p.m. UTC
v2:
Split v1 up to separate commits for each logically independent change

Dehan Meng (4):
  sscanf return values are checked to ensure correct parsing.
  Proper initialization of n to 0 for getline to function correctly.
  Avoiding freeing line prematurely. It's now only freed at the end of
    the function.
  For correcting code style: Variable declarations moved to the
    beginning of blocks Followed the coding style of using snake_case
    for variable names. And merged redundant route and networkroute
    variables.

Signed-off-by: Dehan Meng <demeng@redhat.com>

 qga/commands-linux.c | 128 ++++++++++++++++++++-----------------------
 1 file changed, 59 insertions(+), 69 deletions(-)