Some more patchelttes from Larry Doolittle.
[oweals/busybox.git] / df.c
diff --git a/df.c b/df.c
index 21a1dbb319fc3a04d619606437d3d2458e412bec..df68744337e2ebf4adc52ad2c43e3fd7a7681cd6 100644 (file)
--- a/df.c
+++ b/df.c
@@ -60,7 +60,9 @@ static int do_df(char *device, const char *mount_point)
                if (strcmp(device, "/dev/root") == 0) {
                        /* Adjusts device to be the real root device,
                         * or leaves device alone if it can't find it */
-                       find_real_root_device_name( device);
+                       device = find_real_root_device_name(device);
+                       if(device==NULL)
+                               return FALSE;
                }
 #ifdef BB_FEATURE_HUMAN_READABLE
                switch (df_disp_hr) {