In at least version 2.0.9 of iperf2 (taken from current git), there's a mismatched new[]/delete. The delete also needs to be a delete[]. This shows up immediately in valgrind when run with memcheck.
The fix is pretty simple:
@@ -586,7 +589,7 @@ mExtSettings->mBindPort = atoi(results); } } - delete parsedopts; + delete[] parsedopts; if (mExtSettings->mLocalhost == NULL) { mExtSettings->mLocalhost = new char[ strlen( optarg ) + 1 ]; strcpy( mExtSettings->mLocalhost, optarg );
If this patch is included, please credit it to Nick Black of Luma, Inc. Thanks!
Fixed and thanks.
https://sourceforge.net/p/iperf2/code/ci/0267746f135df0a27e650d35525fef6ca4aa6d3d/
Bob
credit it to Nick Black of Luma, Inc
Log in to post a comment.
In at least version 2.0.9 of iperf2 (taken from current git), there's a mismatched new[]/delete. The delete also needs to be a delete[]. This shows up immediately in valgrind when run with memcheck.
The fix is pretty simple:
@@ -586,7 +589,7 @@
mExtSettings->mBindPort = atoi(results);
}
}
- delete parsedopts;
+ delete[] parsedopts;
if (mExtSettings->mLocalhost == NULL) {
mExtSettings->mLocalhost = new char[ strlen( optarg ) + 1 ];
strcpy( mExtSettings->mLocalhost, optarg );
If this patch is included, please credit it to Nick Black of Luma, Inc. Thanks!
Fixed and thanks.
https://sourceforge.net/p/iperf2/code/ci/0267746f135df0a27e650d35525fef6ca4aa6d3d/
Bob