X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fglob.c;h=ad8aa5441f46f651592770fb08079ce189553727;hp=e94e4aa764015628a9c0cc9e607d70414ba9c406;hb=9ba779ea367b2ea7077da7bdd75e813cd06c7eea;hpb=e9c37113104c1cfb234535adc9b52ad3880a41ce diff --git a/daemon/glob.c b/daemon/glob.c index e94e4aa..ad8aa54 100644 --- a/daemon/glob.c +++ b/daemon/glob.c @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include @@ -40,6 +40,10 @@ do_glob_expand (const char *pattern) char **rv; rv = malloc (sizeof (char *) * 1); + if (rv == NULL) { + reply_with_perror ("malloc"); + return NULL; + } rv[0] = NULL; return rv; /* Caller frees. */ }