diff options
Diffstat (limited to 'src/fs/fs_tree.c')
-rw-r--r-- | src/fs/fs_tree.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index 4d15d78f3..07f78eea7 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -385,8 +385,15 @@ void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder * te, | |||
385 | struct GNUNET_FS_Uri **uri, | 385 | struct GNUNET_FS_Uri **uri, |
386 | char **emsg) | 386 | char **emsg) |
387 | { | 387 | { |
388 | *uri = te->uri; | 388 | if (uri != NULL) |
389 | *emsg = te->emsg; | 389 | *uri = te->uri; |
390 | else | ||
391 | if (NULL != te->uri) | ||
392 | GNUNET_FS_uri_destroy (te->uri); | ||
393 | if (emsg != NULL) | ||
394 | *emsg = te->emsg; | ||
395 | else | ||
396 | GNUNET_free_non_null (te->emsg); | ||
390 | GNUNET_free (te->chk_tree); | 397 | GNUNET_free (te->chk_tree); |
391 | GNUNET_free (te); | 398 | GNUNET_free (te); |
392 | } | 399 | } |