Skip to content

Commit

Permalink
Fix memory leak.
Browse files Browse the repository at this point in the history
All praise to the Clang Static Humiliator, which found this.
  • Loading branch information
guyharris committed Nov 30, 2012
1 parent f97a679 commit 8c03626
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nametoaddr.c
Expand Up @@ -247,6 +247,7 @@ pcap_nametoportrange(const char *name, int *port1, int *port2, int *proto)
free(cpy);
return 0;
}
free(cpy);

if (*proto != save_proto)
*proto = PROTO_UNDEF;
Expand Down

0 comments on commit 8c03626

Please sign in to comment.