mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-08 03:27:58 +03:00
Fix masterlist not being freed when shutting down qr
This commit is contained in:
parent
2cc36ec8e2
commit
938ab07ce0
1 changed files with 10 additions and 0 deletions
|
@ -448,6 +448,14 @@ void qr_shutdown(qr_t qrec)
|
|||
{
|
||||
gsifree(qrec);
|
||||
}
|
||||
|
||||
if (MasterList) {
|
||||
gsifree(MasterList);
|
||||
MasterList = NULL;
|
||||
}
|
||||
|
||||
MasterCount = 0;
|
||||
|
||||
SocketShutDown();
|
||||
}
|
||||
|
||||
|
@ -479,9 +487,11 @@ static int do_connect_multi()
|
|||
MasterMaxCount = qr_get_num_masters();
|
||||
if (MasterList) {
|
||||
gsifree(MasterList);
|
||||
MasterList = NULL;
|
||||
}
|
||||
|
||||
MasterList = gsimalloc(sizeof(struct sockaddr_in) * MasterMaxCount);
|
||||
MasterCount = 0;
|
||||
|
||||
for(i = 0; i < MasterMaxCount; i++) {
|
||||
struct sockaddr_in hbaddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue