The
new_menu() function returns NULL on error, while the
free_menu() function returns one of the following error values:
E_OK
The function was successful.
E_BAD_ARGUMENT
One or more of the arguments passed to the function was incorrect.
E_POSTED
The menu is already posted.