Commit c2e8ba0f authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

free() allocated memory when the ares search can't be made

parent a5360255
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -124,9 +124,14 @@ void ares_search(ares_channel channel, const char *name, int dnsclass,
	  free(s);
	}
      else
      {
        /* failed, free the malloc()ed memory */
        free(squery->name);
        free(squery);
	callback(arg, status, NULL, 0);
      }
    }
}

static void search_callback(void *arg, int status, unsigned char *abuf,
			    int alen)