From c5f879125f1c842f679b2c8e95341f3c1d3aa184 Mon Sep 17 00:00:00 2001 From: Carlo von lynX Date: Wed, 3 Aug 2016 20:28:45 +0000 Subject: leaks & warns --- src/social/gnunet-service-social.c | 1 + src/social/gnunet-social.c | 4 +++- src/social/test_social.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/social') diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index e499130d4..afcd59b5d 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c @@ -1004,6 +1004,7 @@ place_recv_save_data (void *cls, if (plc->file_offset != GNUNET_DISK_file_seek (fh, plc->file_offset, GNUNET_DISK_SEEK_SET)) { GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "seek", filename); + GNUNET_DISK_file_close (fh); GNUNET_free (filename); return; } diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index 5aa74c81a..39ebff442 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c @@ -936,8 +936,10 @@ guest_reconnected (void *cls, int result, const struct GNUNET_CRYPTO_EddsaPublicKey *place_pub_key, uint64_t max_message_id) { + char *place_pub_str = GNUNET_CRYPTO_eddsa_public_key_to_string (place_pub_key); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Guest reconnected to place %s.\n", GNUNET_CRYPTO_eddsa_public_key_to_string(place_pub_key)); + "Guest reconnected to place %s.\n", place_pub_str); + GNUNET_free (place_pub_str); if (op_guest_leave) { guest_leave (); diff --git a/src/social/test_social.c b/src/social/test_social.c index eb32a031f..406f5cb67 100644 --- a/src/social/test_social.c +++ b/src/social/test_social.c @@ -1085,7 +1085,7 @@ host_answer_door (void *cls, (uint8_t) test, join_req_count); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%s\n%.*s\n", - method_name, data_size, (const char *) data); + method_name, (int) data_size, (const char *) data); switch (test) { -- cgit v1.2.3