function: lx_zfree()
USAGE:
Zero the memory area used by s. Then free s and set
s->s back to 0 by way of lx_free().
Note that not all allocated memory is necessarily zeroed; just that which is
currently in use.
PROPERTIES |
return value |
void |
allocation ensured |
n/a |
previous allocation required |
yes (error checks) |
SEE ALSO:
EXAMPLE:
{
lx_s ns = {0};
lx_strset (&ns, "some sensitive information.");
ns.s[ns.len-1] = 0; /* replace '.' with '\0' */
lx_strout (4, &ns); /* write to imaginary pipe on fd 4 */
lx_zfree (&ns);
}