projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
missing
[oweals/gnunet.git]
/
src
/
fragmentation
/
fragmentation.c
diff --git
a/src/fragmentation/fragmentation.c
b/src/fragmentation/fragmentation.c
index 58fcd834a1c6cf3f1f5f55f364dbd9a3ac4a56ae..ecd82b2c4ba4e1809ebfa6fae1bcaa28b46b0b61 100644
(file)
--- a/
src/fragmentation/fragmentation.c
+++ b/
src/fragmentation/fragmentation.c
@@
-35,10
+35,12
@@
#include "gnunet_fragmentation_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_util_lib.h"
#include "gnunet_fragmentation_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_util_lib.h"
+
/**
* Message fragment. This header is followed
* by the actual data of the fragment.
*/
/**
* Message fragment. This header is followed
* by the actual data of the fragment.
*/
+
struct Fragment
{
struct Fragment
{
@@
-181,10
+183,16
@@
void
GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *ctx)
{
struct GNUNET_FRAGEMENT_Ctxbuffer *buffer;
GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *ctx)
{
struct GNUNET_FRAGEMENT_Ctxbuffer *buffer;
- for(buffer = ctx->buffer; buffer!=NULL; buffer = buffer->next){
- GNUNET_free(buffer->num);
- GNUNET_free(buffer);
- }
+ struct GNUNET_FRAGEMENT_Ctxbuffer *temp;
+ buffer = ctx->buffer;
+
+ while (buffer != NULL)
+ {
+ temp = buffer->next;
+ GNUNET_free(buffer->num);
+ GNUNET_free(buffer);
+ buffer = temp;
+ }
GNUNET_free(ctx);
GNUNET_assert (0);
}
GNUNET_free(ctx);
GNUNET_assert (0);
}