BUG/MINOR: server: check strdup return on server-template ID generation
Check strdup() return value when a server-template prefix is expanded
into the final server name. Now, an alert is reported in case of error
and server parsing is interrupted.
Along with this change, the server prefix expansion function has been
renamed and its documentation adjusted.
This could be backported to all stable releases. However, this depends
on a previous patch which prevents ignoring of errors during
server-template generation. As this is a minor fix which is only useful
after memory allocation failure, it is probably better to not pick them.
If backporting is considered necessary, the following patch is required
first.
commit
467440a34f81c635ccb33d434328799b027cbf03
MINOR: server: do not ignore errors during server-template init