From 62564a0fdcef05c9a2607332f02b2260a6e319cd Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Tue, 1 Jan 2008 15:22:56 -0500 Subject: [PATCH] ATTR SET TARGET fix for complex targets. --- src/commands.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commands.c b/src/commands.c index aa588398..020f78ff 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1808,6 +1808,7 @@ static gpg_error_t target_attribute(struct client_s *client, gchar **req) gchar **src, **dst, *line = NULL; gpg_error_t error; xmlNodePtr n; + gchar **src_orig = NULL; if (!req || !req[0] || !req[1]) return EPWMD_COMMAND_SYNTAX; @@ -1852,6 +1853,7 @@ static gpg_error_t target_attribute(struct client_s *client, gchar **req) } again: + src_orig = g_strdupv(src); n = find_account(client->doc, &src, &error, NULL, 0); if (!n) { @@ -1881,6 +1883,9 @@ again: * Reset the position of the element tree now that the elements * have been created. */ + g_strfreev(src); + src = src_orig; + src_orig = NULL; n = find_account(client->doc, &src, &error, NULL, 0); if (!n) @@ -1900,6 +1905,7 @@ fail: g_free(line); g_strfreev(src); g_strfreev(dst); + g_strfreev(src_orig); return error; } -- 2.11.4.GIT