eSNMP API Routines
free_oct
free_oct
Frees the buffer attached to an
oct
structure. This routine does not deallocate
the
oct
structure; it deallocates the buffer to which the
oct
structure points.
Format
void free_oct ( oct *oct );
Description
This routine frees the dynamically allocated buffer to which the
oct
structure
points, and zeros the pointer and length on the
oct
structure. If the
oct
structure
is already null, this routine does nothing.
If the buffer attached to the
oct
structure is already null, this routine sets the
length field of the
oct
structure to zero.
Example
#include <esnmp.h>
OCT octet;
:
: assume octet was assigned a value (perhaps with mem2oct()
: and we are now finished with it.
:
free_oct(&octet);
eSNMP API Routines 5–55