File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -4127,6 +4127,9 @@ void mg_mgr_free(struct mg_mgr *mgr) {
4127
4127
if (mgr->epoll_fd >= 0) close(mgr->epoll_fd), mgr->epoll_fd = -1;
4128
4128
#endif
4129
4129
mg_tls_ctx_free(mgr);
4130
+ #if MG_ENABLE_TCPIP
4131
+ if (mgr->ifp) mg_tcpip_free(mgr->ifp);
4132
+ #endif
4130
4133
}
4131
4134
4132
4135
void mg_mgr_init(struct mg_mgr *mgr) {
@@ -4162,7 +4165,7 @@ void mg_mgr_init(struct mg_mgr *mgr) {
4162
4165
#endif
4163
4166
4164
4167
4165
- #if defined(MG_ENABLE_TCPIP) && MG_ENABLE_TCPIP
4168
+ #if MG_ENABLE_TCPIP
4166
4169
#define MG_EPHEMERAL_PORT_BASE 32768
4167
4170
#define PDIFF(a, b) ((size_t) (((char *) (b)) - ((char *) (a))))
4168
4171
Original file line number Diff line number Diff line change @@ -247,6 +247,9 @@ void mg_mgr_free(struct mg_mgr *mgr) {
247
247
if (mgr -> epoll_fd >= 0 ) close (mgr -> epoll_fd ), mgr -> epoll_fd = -1 ;
248
248
#endif
249
249
mg_tls_ctx_free (mgr );
250
+ #if MG_ENABLE_TCPIP
251
+ if (mgr -> ifp ) mg_tcpip_free (mgr -> ifp );
252
+ #endif
250
253
}
251
254
252
255
void mg_mgr_init (struct mg_mgr * mgr ) {
Original file line number Diff line number Diff line change 1
1
#include "net_builtin.h"
2
2
3
- #if defined( MG_ENABLE_TCPIP ) && MG_ENABLE_TCPIP
3
+ #if MG_ENABLE_TCPIP
4
4
#define MG_EPHEMERAL_PORT_BASE 32768
5
5
#define PDIFF (a , b ) ((size_t) (((char *) (b)) - ((char *) (a))))
6
6
You can’t perform that action at this time.
0 commit comments