unit1675: fix potential memory leak on dynbuf fail path

Spotted by GitHub Code Quality

Closes #21922
This commit is contained in:
Viktor Szakats 2026-06-09 11:28:06 +02:00
parent 4aa8cc3c4a
commit bbb226b226
No known key found for this signature in database

View file

@ -111,6 +111,7 @@ static CURLcode test_unit1675(const char *arg)
int rc;
curlx_dyn_reset(&host);
if(curlx_dyn_add(&host, tests[i].in)) {
curlx_dyn_free(&host);
return CURLE_OUT_OF_MEMORY;
}
rc = ipv4_normalize(&host);