mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fish: Check for out of memory failure.
(Found by Coverity)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user