X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=align%2Fscan.c;h=7b4631ab254f07ded0f6f5435a333f22dc336f5a;hb=27d00960c93b26c68fa1f4068502c32a6e3b5e94;hp=a409654a3410bc235a6a9e48cffbb83d0eabe94a;hpb=b4bb49ffd123e36d6319281dcc2080b30e23e447;p=libguestfs.git diff --git a/align/scan.c b/align/scan.c index a409654..7b4631a 100644 --- a/align/scan.c +++ b/align/scan.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 @@ -228,9 +228,13 @@ scan (void) struct guestfs_partition_list *parts; devices = guestfs_list_devices (g); + if (devices == NULL) + exit (EXIT_FAILURE); for (i = 0; devices[i] != NULL; ++i) { parts = guestfs_part_list (g, devices[i]); + if (parts == NULL) + exit (EXIT_FAILURE); /* Canonicalize the name of the device for printing. */ if (STRPREFIX (devices[i], "/dev/") &&