Browse Source

gps: fix memory leak on module exit (delete _helper)

sbg
Beat Küng 5 years ago committed by Daniel Agar
parent
commit
e906106ea2
  1. 16
      src/drivers/gps/gps.cpp

16
src/drivers/gps/gps.cpp

@ -294,18 +294,10 @@ GPS::~GPS()
} while (_secondary_instance && i < 100); } while (_secondary_instance && i < 100);
} }
if (_sat_info) { delete _sat_info;
delete (_sat_info); delete _dump_to_device;
} delete _dump_from_device;
delete _helper;
if (_dump_to_device) {
delete (_dump_to_device);
}
if (_dump_from_device) {
delete (_dump_from_device);
}
} }
int GPS::callback(GPSCallbackType type, void *data1, int data2, void *user) int GPS::callback(GPSCallbackType type, void *data1, int data2, void *user)

Loading…
Cancel
Save