mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 18:24:49 +00: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
|
@ -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…
Reference in a new issue