fish: Check for out of memory failure.

(Found by Coverity)
This commit is contained in:
Richard W.M. Jones
2013-05-28 15:48:42 +01:00
parent a9a191d20e
commit e52a6b56f4

View File

@@ -270,6 +270,10 @@ make_server (xmlURIPtr uri, const char *socket)
* only a singleton is passed by us.
*/
ret = malloc (sizeof (char *) * 2);
if (ret == NULL) {
perror ("malloc");
exit (EXIT_FAILURE);
}
ret[0] = server;
ret[1] = NULL;