Skip to content

qemu-ga: Fix some potential issues find by coverity

Dehan Meng qemu-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/24 patches 0 repliesNew
  2. v2 posting 1/24 patches 5 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

Split v1 up to separate commits for each logically independent change

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sscanf return values are checked to ensure correct parsing.qga/commands-linux.c+3 -10 replies
2/4Proper initialization of n to 0 for getline to function correctly.qga/commands-linux.c+1 -10 replies
3/4Avoiding freeing line prematurely. It's now only freed at the end of the function.qga/commands-linux.c+2 -40 replies
4/4For 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.qga/commands-linux.c+53 -630 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel P. Berrangé
SeriesR-b R-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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.

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