tune2fs-l: Add a test.
[libguestfs.git] / daemon / glob.c
index e94e4aa..ad8aa54 100644 (file)
@@ -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 <config.h>
@@ -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. */
   }