]> git.pld-linux.org Git - packages/setup.git/commitdiff
- check for malloc failure auto/ac/setup-2_4_10-1
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 17 Sep 2005 13:10:26 +0000 (13:10 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    setup-update-fstab.c -> 1.2

setup-update-fstab.c

index 34fb649090d467a1237370a72c47784d3aedf05b..9a85d2f3d5b57070cebaccf6a368225d268d8239 100644 (file)
@@ -36,6 +36,10 @@ int main()
        }
        fstat(fd, &st);
        old = (char *) malloc(st.st_size);
+       if (old == NULL) {
+               eputs("\nError: malloc failure\n");
+               return 1;
+       }
        read(fd, old, st.st_size);
        close(fd);
        old_sz = st.st_size;
This page took 0.085371 seconds and 4 git commands to generate.