Prevent theoretical double free and leak on get_peer_sock_name.
authorRami Ylimäki <rami.ylimaki@vincit.fi>
Wed, 23 Mar 2011 15:47:50 +0000 (17:47 +0200)
committerPeter Harris <pharris@opentext.com>
Thu, 24 Mar 2011 15:30:21 +0000 (11:30 -0400)
Variable new_sockname will leak and sockname will be double freed if
both of the cases shown below are true.

1. realloc succeeds and doesn't return the original pointer
2. calling socket_func fails

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Arnaud Fontaine <arnau@debian.org>
Signed-off-by: Peter Harris <pharris@opentext.com>

No differences found