fix uninit variable causing crash on 0 value
[oweals/gnunet.git] / src / gns / gnunet-service-gns_interceptor.c
index 3cf3c4e0b5485acdce949d5a5bb12e91d315aa91..7a3cfc0ddfe5a1e1966c6e7b7e9002873ba2b727 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2009-2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009-2013 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -261,6 +261,8 @@ reply_to_dns (void *cls, uint32_t rd_count,
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                  _("Error converting GNS response to DNS response!\n"));
+      if (GNUNET_NO == ret)
+        GNUNET_free (buf);
     }
     else
     {