Free previously allocated memory.
CS_RETCODE srv_free(mp)
CS_VOID *mp;
A pointer to the memory to be freed.
Returns  | 
To indicate  | 
|---|---|
CS_SUCCEED  | 
The routine completed successfully.  | 
CS_FAIL  | 
The routine failed.  | 
#include <ospublic.h>
/*
** Local Prototype
*/
CS_RETCODE ex_srv_free PROTOTYPE((
CS_BYTE *p
));
/*
** EX_SRV_FREE
**
** Example routine to free memory allocated through srv_alloc.
**
** Arguments:
** p - The address of the memory block to be freed.
**
** Returns:
**
** CS_SUCCEED Memory was freed successfully.
** CS_FAIL An error was detected.
*/
CS_RETCODE ex_srv_free(p)
CS_BYTE *p;
{
    /*
    ** Free the memory block.
    */
    if( srv_free(p) == CS_FAIL )
    {
        return CS_FAIL;
    }
    return CS_SUCCEED;
}
Use srv_free only to free memory allocated by srv_alloc, srv_init, or srv_realloc.
Currently, srv_free calls the C routine, free. An Open Server application, however, can install its own memory management routines using the srv_props routine. The parameter-passing conventions of the user-installed routine must be the same as those of free. If the application is not configured to use the user-installed routines, it will use free.