aboutsummaryrefslogtreecommitdiff
path: root/src/credential/plugin_gnsrecord_credential.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/credential/plugin_gnsrecord_credential.c')
-rw-r--r--src/credential/plugin_gnsrecord_credential.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/credential/plugin_gnsrecord_credential.c b/src/credential/plugin_gnsrecord_credential.c
index 342790b7a..ffb2857dc 100644
--- a/src/credential/plugin_gnsrecord_credential.c
+++ b/src/credential/plugin_gnsrecord_credential.c
@@ -199,6 +199,13 @@ credential_string_to_value (void *cls,
199 GNUNET_free (tmp_str); 199 GNUNET_free (tmp_str);
200 tmp_str = GNUNET_strdup (s); 200 tmp_str = GNUNET_strdup (s);
201 token = strtok (tmp_str, ","); 201 token = strtok (tmp_str, ",");
202 if (NULL == token)
203 {
204 GNUNET_free (tmp_str);
205 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
206 "Malformed string %s\n", s);
207 return GNUNET_SYSERR;
208 }
202 struct GNUNET_CREDENTIAL_DelegationSet set[entries]; 209 struct GNUNET_CREDENTIAL_DelegationSet set[entries];
203 for (i=0;i<entries;i++) 210 for (i=0;i<entries;i++)
204 { 211 {
@@ -219,7 +226,10 @@ credential_string_to_value (void *cls,
219 set); 226 set);
220 227
221 if (-1 == tmp_data_size) 228 if (-1 == tmp_data_size)
229 {
230 GNUNET_free (tmp_str);
222 return GNUNET_SYSERR; 231 return GNUNET_SYSERR;
232 }
223 *data_size += tmp_data_size; 233 *data_size += tmp_data_size;
224 *data = sets = GNUNET_malloc (*data_size); 234 *data = sets = GNUNET_malloc (*data_size);
225 GNUNET_CREDENTIAL_delegation_set_serialize (entries, 235 GNUNET_CREDENTIAL_delegation_set_serialize (entries,