mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
[asd-gogtrak] fix free/delete mismatch
This was using delete for a buffer allocated with calloc(). BTW this definition is more simple than previous. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
This commit is contained in:
parent
69d1ac8314
commit
d1b25c044a
1 changed files with 2 additions and 4 deletions
|
@ -514,11 +514,9 @@ static int asd_dive_parser(const std::string &input, struct dive *asd_dive, stru
|
|||
goto bailout;
|
||||
|
||||
rc = libdc_buffer_parser(asd_dive, devdata.get(), dc_data, s);
|
||||
if (rc != DC_STATUS_SUCCESS) {
|
||||
delete[] dc_data;
|
||||
free(dc_data);
|
||||
if (rc != DC_STATUS_SUCCESS)
|
||||
goto bailout;
|
||||
}
|
||||
delete[] dc_data;
|
||||
// set serial in DC info, and set a node for the device.
|
||||
asd_dive->dcs[0].serial = std::to_string(dc_serial);
|
||||
create_device_node(log->devices, asd_dive->dcs[0].model, asd_dive->dcs[0].serial, asd_dive->dcs[0].model);
|
||||
|
|
Loading…
Add table
Reference in a new issue