Permalink
Browse files

Fix incorrect allocation in ares_parse_ptr_reply()

  • Loading branch information...
1 parent b5823d6 commit 654733a3998f0f72a67add9e386e550fe02da2b2 @jhrozek jhrozek committed Jun 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ares_parse_ptr_reply.c
View
2 ares_parse_ptr_reply.c
@@ -118,7 +118,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
if (hostname)
free(hostname);
hostname = rr_data;
- aliases[aliascnt] = malloc((strlen(rr_data)+1) * sizeof(char *));
+ aliases[aliascnt] = malloc((strlen(rr_data)+1) * sizeof(char));
if (!aliases[aliascnt])
{
status = ARES_ENOMEM;

0 comments on commit 654733a

Please sign in to comment.