nm-activation-request: Make use of libgsystem local allocations

Just cleaner code.

Reviewed-by: Pavel Šimerda <psimerda@redhat.com>
This commit is contained in:
Colin Walters 2013-08-29 14:56:59 -04:00
parent a9b9330bed
commit 5fcf647a28
2 changed files with 5 additions and 6 deletions

@ -1 +1 @@
Subproject commit 033511a303748b2ca7c751f0f132cf9ec778d42e
Subproject commit 00bd926b02e30484942405379c23e493c048b793

View file

@ -27,6 +27,8 @@
#include <unistd.h>
#include <dbus/dbus-glib.h>
#include "libgsystem.h"
#include "nm-activation-request.h"
#include "nm-logging.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)) {
ShareRule *rule = (ShareRule *) iter->data;
char *envp[1] = { NULL };
char **argv;
char *cmd;
gs_strfreev char **argv = NULL;
gs_free char *cmd = NULL;
cmd = g_strdup_printf ("%s --table %s %s %s",
IPTABLES_PATH,
@ -255,9 +257,6 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared)
WEXITSTATUS (status));
}
}
g_free (cmd);
if (argv)
g_strfreev (argv);
}
g_slist_free (list);