mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 12:00:11 +01:00
all: fix wrong "gs_free GError *" declarations
This is a bug and leads either to a leak or a crash.
This commit is contained in:
parent
ec0adbfaf0
commit
4a3ca7115a
4 changed files with 6 additions and 6 deletions
|
|
@ -7649,7 +7649,7 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
|
|||
}
|
||||
} else {
|
||||
gs_free char *prop_name = NULL;
|
||||
gs_free GError *tmp_err = NULL;
|
||||
gs_free_error GError *tmp_err = NULL;
|
||||
|
||||
prop_name = is_property_valid (ss, cmd_arg_p, &tmp_err);
|
||||
if (prop_name) {
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ _nmtstc_client_new_cb (GObject *source_object,
|
|||
static NMClient *
|
||||
_nmtstc_client_new (gboolean sync)
|
||||
{
|
||||
gs_free GError *error = NULL;
|
||||
gs_free_error GError *error = NULL;
|
||||
NMClient *client;
|
||||
|
||||
/* Create a NMClient instance synchronously, and arbitrarily use either
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ _network_server_register_req_data_complete (NetworkServerRegisterReqData *r_req_
|
|||
nm_clear_g_cancellable (&r_req_data->int_cancellable);
|
||||
|
||||
if (r_req_data->callback) {
|
||||
gs_free GError *error_cancelled = NULL;
|
||||
gs_free_error GError *error_cancelled = NULL;
|
||||
|
||||
if (g_cancellable_set_error_if_cancelled (r_req_data->ext_cancellable, &error_cancelled))
|
||||
error = error_cancelled;
|
||||
|
|
@ -314,7 +314,7 @@ _device_connect_req_data_complete (DeviceConnectReqData *c_req_data,
|
|||
nm_clear_g_source (&c_req_data->timeout_wait_connect_id);
|
||||
|
||||
if (c_req_data->callback) {
|
||||
gs_free GError *error_cancelled = NULL;
|
||||
gs_free_error GError *error_cancelled = NULL;
|
||||
|
||||
if (g_cancellable_set_error_if_cancelled (c_req_data->ext_cancellable, &error_cancelled)) {
|
||||
error = error_cancelled;
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ _connect_socket_connect_cb (GIOChannel *stream,
|
|||
gpointer user_data)
|
||||
{
|
||||
NMBluez5DunContext *context = user_data;
|
||||
gs_free GError *error = NULL;
|
||||
gs_free_error GError *error = NULL;
|
||||
int errsv = 0;
|
||||
socklen_t slen = sizeof(errsv);
|
||||
int r;
|
||||
|
|
@ -471,7 +471,7 @@ _connect_sdp_search_io_cb (GIOChannel *io_channel,
|
|||
gpointer user_data)
|
||||
{
|
||||
NMBluez5DunContext *context = user_data;
|
||||
gs_free GError *error = NULL;
|
||||
gs_free_error GError *error = NULL;
|
||||
int errsv;
|
||||
|
||||
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue