mirror of
https://github.com/xemu-project/xemu.git
synced 2026-07-11 01:24:41 +02:00
net/passt: Check return value of g_remove() in net_passt_cleanup() (CID 1612369)
If g_remove() fails, use warn_report() to log an error. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
committed by
Jason Wang
parent
c40ef7243f
commit
f74e4f2e60
+4
-1
@@ -103,7 +103,10 @@ static void net_passt_cleanup(NetClientState *nc)
|
||||
#endif
|
||||
|
||||
kill(s->pid, SIGTERM);
|
||||
g_remove(s->pidfile);
|
||||
if (g_remove(s->pidfile) != 0) {
|
||||
warn_report("Failed to remove passt pidfile %s: %s",
|
||||
s->pidfile, strerror(errno));
|
||||
}
|
||||
g_free(s->pidfile);
|
||||
g_ptr_array_free(s->args, TRUE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user