str_destroy

This commit is contained in:
2025-11-26 17:06:32 +05:00
parent 2686ca6bcf
commit f5169e8a8f
10 changed files with 25 additions and 22 deletions

View File

@@ -57,8 +57,8 @@ Result(void) ClientCLI_run(ClientCLI* self) {
str username = str_null, password = str_null;
try_void(ClientCLI_askUserNameAndPassword(&username, &password));
Defer(
str_free(username);
str_free(password);
str_destroy(username);
str_destroy(password);
);
Client_free(self->client);
try(self->client, p, Client_create(username, password));
@@ -85,7 +85,7 @@ Result(void) ClientCLI_run(ClientCLI* self) {
Error_addCallPos(com_result.error, ErrorCallPos_here());
str e_str = Error_toStr(com_result.error);
printf("\n"FMT_str"\n", e_str.len, e_str.data);
str_free(e_str);
str_destroy(e_str);
Error_free(com_result.error);
}
}