Lakitu: curl: backport fix for CVE-2021-22945

Backport fix to clear leftovers pointer when sending succeeds in mqtt.c
adapted from net-misc/curl upstream commit 43157490a5054bd.

BUG=b/202379149
TEST=presubmit, validation tests
RELEASE_NOTE=Fixed CVE-2021-22945 in net-misc/curl

cos-patch: security-high
Change-Id: Ie204b2d7d45a145f583c7781163394418633d6c1
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/portage-stable/+/24050
Reviewed-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Main-Branch-Verified: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
2 files changed