Coverity 1500722: Warnings in congestion control code
From alert:
** CID 1500722: (RESOURCE_LEAK)
/src/core/or/congestion_control_common.c: 1349 in congestion_control_build_ext_response()
/src/core/or/congestion_control_common.c: 1349 in congestion_control_build_ext_response()
*** CID 1500722: (RESOURCE_LEAK)
/src/core/or/congestion_control_common.c: 1349 in congestion_control_build_ext_response()
1343 if (ext) {
1344 trn_extension_free(ext);
1345 } else {
1346 trn_extension_field_free(field);
1347 }
1348 trn_extension_field_cc_free(cc_field);
>>> CID 1500722: (RESOURCE_LEAK)
>>> Variable "field" going out of scope leaks the storage it points to.
1349 return (int)ret;
1350 }
1351
1352 /** Return true iff the given sendme increment is within the acceptable
1353 * margins. */
1354 bool
/src/core/or/congestion_control_common.c: 1349 in congestion_control_build_ext_response()
1343 if (ext) {
1344 trn_extension_free(ext);
1345 } else {
1346 trn_extension_field_free(field);
1347 }
1348 trn_extension_field_cc_free(cc_field);
>>> CID 1500722: (RESOURCE_LEAK)
>>> Variable "field" going out of scope leaks the storage it points to.
1349 return (int)ret;
1350 }
1351
1352 /** Return true iff the given sendme increment is within the acceptable
1353 * margins. */
1354 bool