Skip to content

Commit a5c7781

Browse files
committed
adsb: Fix additional instance of the same error in ADSB RAW websockets
deleting the reference object too soon during closing the socket
1 parent 45bda45 commit a5c7781

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

phy_adsb.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,9 @@ kis_adsb_phy::kis_adsb_phy(int in_phyid) :
468468

469469
uptr->ws->write(adsb_content);
470470
} catch (std::exception& e) {
471-
delete uptr;
472471
return 0;
473472
}
474473

475-
delete uptr;
476474
return 1;
477475
}, uptr, CHAINPOS_LOGGING, 1000);
478476

@@ -485,6 +483,7 @@ kis_adsb_phy::kis_adsb_phy(int in_phyid) :
485483
}
486484

487485
packetchain->remove_handler(raw_handler_id, CHAINPOS_LOGGING);
486+
delete uptr;
488487
}));
489488

490489
}

0 commit comments

Comments
 (0)