Tspi_Context_FreeMemory(3)
π Tspi_Context_FreeMemory β Library Functions Manual, section 3 π
okay bestie, welcome to the TCG Software Stack Developers Reference π«Ά this is Tspi_Context_FreeMemory(3) and she's here to help you not leak memory like it's a broken faucet. let's get into it β¨
πΈ NAME πΈ
Tspi_Context_FreeMemory β free allocated memory for a given context. that's it, that's the whole job, and she does it flawlessly π
π¦ SYNOPSIS π¦
#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>
TSS_RESULT Tspi_Context_FreeMemory(TSS_HCONTEXT hContext, BYTE* rgbMemory);
look at all those includes, she's high maintenance but worth it, no cap π
π DESCRIPTION π
so here's the tea, bestie: Tspi_Context_FreeMemory frees memory that the TSS Service Provider allocated, and it does it on a per-context basis. so like, every context gets its own lil memory pile and this function is the one that tidies it up π§Ή
important!! you should call this before Tspi_Context_Close is called, otherwise you get memory leaks. and leaks are not the vibe. π
π PARAMETERS π
hContext
the hContext parameter is the handle to the local context. it's giving "your ticket to the party" ποΈ β it tells the function which context's memory we're dealing with.
rgbMemory
the rgbMemory parameter is a pointer to the memory block that needs to be freed. and here's the iconic part: if this is NULL, all memory blocks bound to the context are freed. so NULL is basically the "clean the whole room" button π§β¨
π RETURN CODES π
Tspi_Context_FreeMemory returns TSS_SUCCESS on success. otherwise, one of these lil gremlins comes back at you:
TSS_E_INVALID_HANDLEβhContextis not a valid handle. ma'am, that handle is fake πTSS_E_INTERNAL_ERRORβ an internal SW error has been detected. not our fault, something inside went sideways π
π CONFORMING TO π
Tspi_Context_FreeMemory conforms to the Trusted Computing Group Software Specification version 1.1 Golden. certified, official, ate π
β
β¨ SEE ALSO β¨
and that's the whole page, bestie!! π this one's from TSS 1.1, dated 2004-05-25, and yeah she's been holding it down since the mid-2000s. free your memory, close your contexts, and stay leak-free fr fr ππ¦π
π¦ where this page comes from
- debian bookworm: libtspi-dev 0.3.15-0.3 Β· BSD-3-Clause
- debian trixie: libtspi-dev 0.3.15-0.4 Β· BSD-3-Clause
- epel 10: trousers-devel 0.3.15-11.el10_0 Β· BSD
- epel 9: trousers-devel 0.3.15-5.el9 Β· BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-15.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: trousers-devel 0.3.15-16.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: trousers-devel 0.3.15-17.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: trousers 0.3.15
- nixpkgs unstable: netbsd-source 11.0
- nixpkgs unstable: trousers 0.3.15
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: trousers-devel 0.3.15-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libtspi-dev 0.3.15-0.2 Β· BSD-3-Clause
- ubuntu noble: libtspi-dev 0.3.15-0.3build2 Β· BSD-3-Clause
- ubuntu questing: libtspi-dev 0.3.15-0.4
- ubuntu resolute: libtspi-dev 0.3.15-1 Β· BSD-3-Clause
- ubuntu stonking: libtspi-dev 0.3.15-1ubuntu2 Β· BSD-3-Clause
- Copyright (C) 2004 International Business Machines Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms