Skip to content

Commit

Permalink
cluster: fixed memory leak when fetching the services from the cosnci…
Browse files Browse the repository at this point in the history
…ence.
  • Loading branch information
jfsmig committed May 15, 2015
1 parent b10275a commit f0a45a0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cluster/remote/gridcluster_remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,16 @@ gcluster_get_services(const char *target, gdouble timeout,
const gchar *type, gboolean full, GError ** error)
{
struct message_s *req = message_create_named(NAME_MSGNAME_CS_GET_SRV);
message_add_fields_str (req,
NAME_MSGKEY_TYPENAME, type,
NAME_MSGKEY_FULL, full?"1":NULL,
NULL);
message_add_field (req, NAME_MSGKEY_TYPENAME, type, strlen(type));
if (full)
message_add_field_struint (req, NAME_MSGKEY_FULL, 1);
GByteArray *gba = message_marshall_gba_and_clean(req);

GSList *out = NULL;
GError *err = gridd_client_exec_and_decode (target, timeout,
message_marshall_gba_and_clean(req), &out, service_info_unmarshall);
gba, &out, service_info_unmarshall);
g_byte_array_unref(gba);

if (err) {
if (error)
g_error_transmit(error, err);
Expand Down

0 comments on commit f0a45a0

Please sign in to comment.