summaryrefslogtreecommitdiff
path: root/ext/sockets/multicast.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sockets/multicast.c')
-rw-r--r--ext/sockets/multicast.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c
index e32b2d8457..672e34e1d3 100644
--- a/ext/sockets/multicast.c
+++ b/ext/sockets/multicast.c
@@ -652,6 +652,7 @@ retry:
goto retry;
}
if (retval != NO_ERROR) {
+ efree(addr_table);
php_error_docref(NULL, E_WARNING,
"GetIpAddrTable failed with error %lu", retval);
return FAILURE;
@@ -660,9 +661,11 @@ retry:
MIB_IPADDRROW r = addr_table->table[i];
if (r.dwIndex == if_index) {
out_addr->s_addr = r.dwAddr;
+ efree(addr_table);
return SUCCESS;
}
}
+ efree(addr_table);
php_error_docref(NULL, E_WARNING,
"No interface with index %u was found", if_index);
return FAILURE;
@@ -692,6 +695,7 @@ retry:
goto retry;
}
if (retval != NO_ERROR) {
+ efree(addr_table);
php_error_docref(NULL, E_WARNING,
"GetIpAddrTable failed with error %lu", retval);
return FAILURE;
@@ -700,9 +704,11 @@ retry:
MIB_IPADDRROW r = addr_table->table[i];
if (r.dwAddr == addr->s_addr) {
*if_index = r.dwIndex;
+ efree(addr_table);
return SUCCESS;
}
}
+ efree(addr_table);
{
char addr_str[17] = {0};