Skip to content

Commit

Permalink
Merge pull request libevent#22 from mehlis/fix-dns-malloc
Browse files Browse the repository at this point in the history
Fix sizeof usage with a pointer to a struct
  • Loading branch information
nmathewson committed Jul 28, 2014
2 parents 6f076e5 + add106c commit 81e72ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples_R9/R9_multilookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int main(int argc, char **argv)
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = IPPROTO_TCP;

if (!(user_data = malloc(sizeof(user_data)))) {
if (!(user_data = malloc(sizeof(struct user_data)))) {
perror("malloc");
exit(1);
}
Expand Down

0 comments on commit 81e72ce

Please sign in to comment.