mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 03:38:09 +02:00
nm-activation-request: Make use of libgsystem local allocations
Just cleaner code. Reviewed-by: Pavel Šimerda <psimerda@redhat.com>
This commit is contained in:
parent
a9b9330bed
commit
5fcf647a28
2 changed files with 5 additions and 6 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 033511a303748b2ca7c751f0f132cf9ec778d42e
|
Subproject commit 00bd926b02e30484942405379c23e493c048b793
|
||||||
|
|
@ -27,6 +27,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dbus/dbus-glib.h>
|
#include <dbus/dbus-glib.h>
|
||||||
|
|
||||||
|
#include "libgsystem.h"
|
||||||
|
|
||||||
#include "nm-activation-request.h"
|
#include "nm-activation-request.h"
|
||||||
#include "nm-logging.h"
|
#include "nm-logging.h"
|
||||||
#include "nm-setting-wireless-security.h"
|
#include "nm-setting-wireless-security.h"
|
||||||
|
|
@ -227,8 +229,8 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared)
|
||||||
for (iter = list; iter; iter = g_slist_next (iter)) {
|
for (iter = list; iter; iter = g_slist_next (iter)) {
|
||||||
ShareRule *rule = (ShareRule *) iter->data;
|
ShareRule *rule = (ShareRule *) iter->data;
|
||||||
char *envp[1] = { NULL };
|
char *envp[1] = { NULL };
|
||||||
char **argv;
|
gs_strfreev char **argv = NULL;
|
||||||
char *cmd;
|
gs_free char *cmd = NULL;
|
||||||
|
|
||||||
cmd = g_strdup_printf ("%s --table %s %s %s",
|
cmd = g_strdup_printf ("%s --table %s %s %s",
|
||||||
IPTABLES_PATH,
|
IPTABLES_PATH,
|
||||||
|
|
@ -255,9 +257,6 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared)
|
||||||
WEXITSTATUS (status));
|
WEXITSTATUS (status));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_free (cmd);
|
|
||||||
if (argv)
|
|
||||||
g_strfreev (argv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_free (list);
|
g_slist_free (list);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue