diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2007-06-07 15:22:38 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2007-06-07 15:22:38 +0000 |
| commit | bb8e783e5698e50f66b443b872c488719ea53ff9 (patch) | |
| tree | 9ba9008288db838a48e9e3d9ca8a7124bc9fdd80 | |
| parent | 3923e640cc61493f22d3c6d955339675ec85d02e (diff) | |
properly allocate memory for svcMDID
| -rw-r--r-- | lasso/id-wsf-2.0/discovery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lasso/id-wsf-2.0/discovery.c b/lasso/id-wsf-2.0/discovery.c index d2730e4e..30330be7 100644 --- a/lasso/id-wsf-2.0/discovery.c +++ b/lasso/id-wsf-2.0/discovery.c @@ -161,7 +161,7 @@ lasso_idwsf2_discovery_process_metadata_register_msg(LassoIdWsf2Discovery *disco if (res == 0) { response->Status = lasso_util_status_new(LASSO_DISCO_STATUS_CODE_OK); /* FIXME : foreach here as well */ - response->SvcMDID = g_list_append(response->SvcMDID, discovery->metadata->svcMDID); + response->SvcMDID = g_list_append(response->SvcMDID, g_strdup(discovery->metadata->svcMDID)); } else { response->Status = lasso_util_status_new(LASSO_DISCO_STATUS_CODE_FAILED); /* XXX : May add secondary status codes here */ @@ -198,7 +198,7 @@ lasso_idwsf2_discovery_process_metadata_register_response_msg(LassoIdWsf2Discove response = LASSO_IDWSF2_DISCO_SVC_MD_REGISTER_RESPONSE(profile->response); /* FIXME : foreach on the list instead */ if (response->SvcMDID != NULL) { - discovery->svcMDID = response->SvcMDID->data; + discovery->svcMDID = g_strdup(response->SvcMDID->data); } } |
