mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-23 19:00:34 +01:00
cli: Assert we don't require multiple commands during client initalization
If a new command was requested while a client was in the process of being created we were just requesting a new client. This was causing leak, so let's strongly ensure this is not the case.
This commit is contained in:
parent
c4c8889256
commit
b68bb97971
1 changed files with 2 additions and 0 deletions
|
|
@ -1251,6 +1251,8 @@ call_cmd (NmCli *nmc, GTask *task, const NMCCommand *cmd, int argc, char **argv)
|
|||
|
||||
g_object_unref (task);
|
||||
} else {
|
||||
nm_assert (nmc->client == NULL);
|
||||
|
||||
nmc->should_wait++;
|
||||
call = g_slice_new0 (CmdCall);
|
||||
call->cmd = cmd;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue