Bug 1008792 - Check for valid pointer before using. r=bwc

This commit is contained in:
Michael Froman 2015-09-01 11:52:43 -05:00
parent a4e33c21ce
commit 22e153a1eb

View File

@ -165,7 +165,7 @@ int nr_socket_buffered_stun_create(nr_socket *inner, int max_pending,
_status=0;
abort:
if (_status) {
if (_status && sock) {
void *sock_v = sock;
sock->inner = 0; /* Give up ownership so we don't destroy */
nr_socket_buffered_stun_destroy(&sock_v);