mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 23:00:19 +01:00
nmcli: avoid freeing NULL GString and correct error message
Fixes #1362 Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
This commit is contained in:
parent
cea9d4634f
commit
ac327cb855
1 changed files with 5 additions and 3 deletions
|
|
@ -2262,7 +2262,7 @@ get_connection(NmCli *nmc,
|
|||
NMCLI_ERROR,
|
||||
NMC_RESULT_ERROR_USER_INPUT,
|
||||
_("%s argument is missing"),
|
||||
selector);
|
||||
(*argv)[0]);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -9369,8 +9369,10 @@ do_connection_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *co
|
|||
g_clear_error(&error);
|
||||
|
||||
if (nmc->return_value != NMC_RESULT_ERROR_NOT_FOUND) {
|
||||
g_string_free(invalid_cons, TRUE);
|
||||
invalid_cons = NULL;
|
||||
if (invalid_cons) {
|
||||
g_string_free(invalid_cons, TRUE);
|
||||
invalid_cons = NULL;
|
||||
}
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue