aboutsummaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-05-15 20:20:48 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-05-15 20:20:48 +0200
commit6d40171315d344d8a62d611df200d43f1fefc238 (patch)
treefb6317bccbda0a259718eaf085431ec30f91f9b4 /src/gns
parent05dc002ec4f5396b5633fcf686cd4cd2d06ae776 (diff)
downloadgnunet-6d40171315d344d8a62d611df200d43f1fefc238.tar.gz
gnunet-6d40171315d344d8a62d611df200d43f1fefc238.zip
-coverity: handle invalid key length
Diffstat (limited to 'src/gns')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 784a6ee6d..958bf2e94 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -1764,8 +1764,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh,
1764 /** 1764 /**
1765 * Records other than GNS2DNS not allowed 1765 * Records other than GNS2DNS not allowed
1766 */ 1766 */
1767 if (NULL != ns) 1767 GNUNET_free (ns);
1768 GNUNET_free (ns); 1768 GNUNET_free (ac);
1769 return GNUNET_SYSERR; 1769 return GNUNET_SYSERR;
1770 } 1770 }
1771 off = 0; 1771 off = 0;
@@ -1777,10 +1777,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh,
1777 (NULL == ip)) 1777 (NULL == ip))
1778 { 1778 {
1779 GNUNET_break_op (0); 1779 GNUNET_break_op (0);
1780 if (NULL != n) 1780 GNUNET_free (n);
1781 GNUNET_free (n); 1781 GNUNET_free (ip);
1782 if (NULL != ip)
1783 GNUNET_free (ip);
1784 continue; 1782 continue;
1785 } 1783 }
1786 1784
@@ -1789,6 +1787,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh,
1789 if (off != rd[i].data_size) 1787 if (off != rd[i].data_size)
1790 { 1788 {
1791 GNUNET_break_op (0); 1789 GNUNET_break_op (0);
1790 GNUNET_free (n);
1791 GNUNET_free (ip);
1792 continue; 1792 continue;
1793 } 1793 }
1794 /* resolve 'ip' to determine the IP(s) of the DNS 1794 /* resolve 'ip' to determine the IP(s) of the DNS