[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: fix memory leak
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: fix memory leak |
Date: |
Sat, 30 Jun 2018 12:01:39 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new dd68d665e fix memory leak
dd68d665e is described below
commit dd68d665e140970c7d9dfd899fbdd4fefacb54a7
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jun 30 12:01:27 2018 +0200
fix memory leak
---
src/namestore/gnunet-zoneimport.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/namestore/gnunet-zoneimport.c
b/src/namestore/gnunet-zoneimport.c
index 6c89cdb05..ddc8b483a 100644
--- a/src/namestore/gnunet-zoneimport.c
+++ b/src/namestore/gnunet-zoneimport.c
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -456,6 +456,7 @@ build_dns_query (struct Request *req,
char *rawp;
struct GNUNET_DNSPARSER_Packet p;
struct GNUNET_DNSPARSER_Query q;
+ int ret;
q.name = (char *) req->hostname;
q.type = GNUNET_DNSPARSER_TYPE_NS;
@@ -467,12 +468,14 @@ build_dns_query (struct Request *req,
p.num_queries = 1;
p.queries = &q;
p.id = req->id;
- if (GNUNET_OK !=
- GNUNET_DNSPARSER_pack (&p,
- UINT16_MAX,
- &rawp,
- raw_size))
+ ret = GNUNET_DNSPARSER_pack (&p,
+ UINT16_MAX,
+ &rawp,
+ raw_size);
+ if (GNUNET_OK != ret)
{
+ if (GNUNET_NO == ret)
+ GNUNET_free (rawp);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to pack query for hostname `%s'\n",
req->hostname);
--
To stop receiving notification emails like this one, please contact
address@hidden