[#BUF_MEM_grow_clean]
= BUF&lowbar;MEM&lowbar;grow&lowbar;clean
:mrdocs:

Grow or shrink a BUF&lowbar;MEM buffer, zeroing any released or newly unused bytes&period;

== Synopsis

Declared in `&lt;openssl&sol;buffer&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
size&lowbar;t
BUF&lowbar;MEM&lowbar;grow&lowbar;clean(
    xref:BUF_MEM.adoc[BUF&lowbar;MEM]* str,
    size&lowbar;t len);
----

== Description

Like BUF&lowbar;MEM&lowbar;grow(), but clears freed trailing data and newly allocated unused space&period;

== Return Value

New length on success, or 0 on allocation failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| Buffer to resize&period;
| *len*
| Desired length in bytes&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
