diff options
Diffstat (limited to 'src/gnunet_chat_lib.c')
-rw-r--r-- | src/gnunet_chat_lib.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c index 5bac17d..b276fe4 100644 --- a/src/gnunet_chat_lib.c +++ b/src/gnunet_chat_lib.c | |||
@@ -314,10 +314,10 @@ GNUNET_CHAT_set_attribute (struct GNUNET_CHAT_Handle *handle, | |||
314 | return; | 314 | return; |
315 | } | 315 | } |
316 | 316 | ||
317 | void *data = NULL; | ||
318 | |||
317 | if (value) | 319 | if (value) |
318 | { | 320 | { |
319 | void *data = NULL; | ||
320 | |||
321 | enum GNUNET_GenericReturnValue result; | 321 | enum GNUNET_GenericReturnValue result; |
322 | result = GNUNET_RECLAIM_attribute_string_to_value( | 322 | result = GNUNET_RECLAIM_attribute_string_to_value( |
323 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, | 323 | GNUNET_RECLAIM_ATTRIBUTE_TYPE_STRING, |
@@ -351,6 +351,9 @@ GNUNET_CHAT_set_attribute (struct GNUNET_CHAT_Handle *handle, | |||
351 | handle->attributes_tail, | 351 | handle->attributes_tail, |
352 | attributes | 352 | attributes |
353 | ); | 353 | ); |
354 | |||
355 | if (data) | ||
356 | GNUNET_free(data); | ||
354 | } | 357 | } |
355 | 358 | ||
356 | 359 | ||