diff options
author | Carlo von lynX <lynX@time.to.get.psyced.org> | 2016-07-28 00:22:43 +0000 |
---|---|---|
committer | Carlo von lynX <lynX@time.to.get.psyced.org> | 2016-07-28 00:22:43 +0000 |
commit | 00da479663f9b8af36a89e6643fed03f4256ce28 (patch) | |
tree | 12156185c781a24ce5081700c1cd92de14a69cc2 /src/social/gnunet-social.c | |
parent | 46b723ebd22301be02cfbca34c471f9397f163c5 (diff) | |
download | gnunet-00da479663f9b8af36a89e6643fed03f4256ce28.tar.gz gnunet-00da479663f9b8af36a89e6643fed03f4256ce28.zip |
social: leaks and untreated error conditions
Diffstat (limited to 'src/social/gnunet-social.c')
-rw-r--r-- | src/social/gnunet-social.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index 68a45bd5e..ab08c90f8 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c | |||
@@ -727,12 +727,13 @@ guest_enter (const struct GNUNET_CRYPTO_EddsaPublicKey *pub_key, | |||
727 | return; | 727 | return; |
728 | } | 728 | } |
729 | 729 | ||
730 | struct GNUNET_PSYC_Message *join_msg = guest_enter_msg_create (); | ||
730 | gst = GNUNET_SOCIAL_guest_enter (app, ego, pub_key, | 731 | gst = GNUNET_SOCIAL_guest_enter (app, ego, pub_key, |
731 | GNUNET_PSYC_SLAVE_JOIN_NONE, | 732 | GNUNET_PSYC_SLAVE_JOIN_NONE, |
732 | peer, 0, NULL, guest_enter_msg_create (), | 733 | peer, 0, NULL, join_msg, slicer_create (), |
733 | slicer_create (), | ||
734 | guest_recv_local_enter, | 734 | guest_recv_local_enter, |
735 | guest_recv_entry_decision, NULL); | 735 | guest_recv_entry_decision, NULL); |
736 | GNUNET_free (join_msg); | ||
736 | plc = GNUNET_SOCIAL_guest_get_place (gst); | 737 | plc = GNUNET_SOCIAL_guest_get_place (gst); |
737 | } | 738 | } |
738 | 739 | ||
@@ -746,10 +747,12 @@ guest_enter_by_name (const char *gns_name) | |||
746 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 747 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
747 | "Entering to place by name as guest.\n"); | 748 | "Entering to place by name as guest.\n"); |
748 | 749 | ||
750 | struct GNUNET_PSYC_Message *join_msg = guest_enter_msg_create (); | ||
749 | gst = GNUNET_SOCIAL_guest_enter_by_name (app, ego, gns_name, NULL, | 751 | gst = GNUNET_SOCIAL_guest_enter_by_name (app, ego, gns_name, NULL, |
750 | guest_enter_msg_create (), slicer, | 752 | join_msg, slicer, |
751 | guest_recv_local_enter, | 753 | guest_recv_local_enter, |
752 | guest_recv_entry_decision, NULL); | 754 | guest_recv_entry_decision, NULL); |
755 | GNUNET_free (join_msg); | ||
753 | plc = GNUNET_SOCIAL_guest_get_place (gst); | 756 | plc = GNUNET_SOCIAL_guest_get_place (gst); |
754 | } | 757 | } |
755 | 758 | ||
@@ -1157,9 +1160,17 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1157 | 1160 | ||
1158 | if (opt_ego) | 1161 | if (opt_ego) |
1159 | { | 1162 | { |
1160 | GNUNET_CRYPTO_ecdsa_public_key_from_string (opt_ego, | 1163 | if (GNUNET_OK != |
1164 | GNUNET_CRYPTO_ecdsa_public_key_from_string (opt_ego, | ||
1161 | strlen (opt_ego), | 1165 | strlen (opt_ego), |
1162 | &ego_pub_key); | 1166 | &ego_pub_key)) |
1167 | { | ||
1168 | FPRINTF (stderr, | ||
1169 | _("Public key `%s' malformed\n"), | ||
1170 | opt_ego); | ||
1171 | exit_fail (); | ||
1172 | return; | ||
1173 | } | ||
1163 | } | 1174 | } |
1164 | 1175 | ||
1165 | core = GNUNET_CORE_connect (cfg, NULL, &core_connected, NULL, NULL, | 1176 | core = GNUNET_CORE_connect (cfg, NULL, &core_connected, NULL, NULL, |