diff options
author | psyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet> | 2018-01-30 11:50:56 +0000 |
---|---|---|
committer | psyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet> | 2018-01-30 11:50:56 +0000 |
commit | b3fdd5716f3e0622508e68450516d11a6d55a0ab (patch) | |
tree | de946fea2cb988902d4bcf9e7e61b639fb77543c /src/social | |
parent | a882bcf1635612a5d65d7a2fd402acd0bf9355ff (diff) | |
download | gnunet-b3fdd5716f3e0622508e68450516d11a6d55a0ab.tar.gz gnunet-b3fdd5716f3e0622508e68450516d11a6d55a0ab.zip |
-code scanner complains about intentional malloc return
Diffstat (limited to 'src/social')
-rw-r--r-- | src/social/gnunet-service-social.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index 31e3a3dc2..21158acd5 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -1774,12 +1774,13 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) | |||
1774 | plc_gst, | 1774 | plc_gst, |
1775 | gst); | 1775 | gst); |
1776 | 1776 | ||
1777 | new_guest = GNUNET_NO; | ||
1778 | if (NULL == gst) | 1777 | if (NULL == gst) |
1779 | { | 1778 | { |
1780 | gst = GNUNET_new (struct Guest); | 1779 | gst = GNUNET_new (struct Guest); |
1781 | new_guest = GNUNET_YES; | 1780 | new_guest = GNUNET_YES; |
1782 | } | 1781 | } |
1782 | else new_guest = GNUNET_NO; | ||
1783 | |||
1783 | if (NULL == gst->slave) | 1784 | if (NULL == gst->slave) |
1784 | { | 1785 | { |
1785 | gst->origin = greq->origin; | 1786 | gst->origin = greq->origin; |
@@ -1878,7 +1879,7 @@ guest_enter (const struct GuestEnterRequest *greq, struct Guest **ret_gst) | |||
1878 | ret = GNUNET_YES; | 1879 | ret = GNUNET_YES; |
1879 | } | 1880 | } |
1880 | 1881 | ||
1881 | // TODO: explain why free(gst) not necessary | 1882 | // TODO: explain to automatic code scanners why free(gst) not necessary |
1882 | if (NULL != ret_gst) | 1883 | if (NULL != ret_gst) |
1883 | *ret_gst = gst; | 1884 | *ret_gst = gst; |
1884 | return ret; | 1885 | return ret; |