]> sourceware.org Git - lvm2.git/commitdiff
ensure dm_strdup succeeds
authorAlasdair Kergon <agk@redhat.com>
Fri, 25 Sep 2009 18:19:09 +0000 (18:19 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 25 Sep 2009 18:19:09 +0000 (18:19 +0000)
libdm/libdm-common.c

index db814eff7c82369ebe13995b7a9cb6e44ed203a4..c985ad7851c252fdb61e2a5f85c02c3acb2ede6a 100644 (file)
@@ -217,7 +217,9 @@ static char *_find_dm_name_of_device(dev_t st_rdev)
                        continue;
 
                if (buf.st_rdev == st_rdev) {
-                       new_name = dm_strdup(name);
+                       if (!(new_name = dm_strdup(name)))
+                               log_error("dm_task_set_name: strdup(%s) failed",
+                                         name);
                        break;
                }
        }
This page took 0.035376 seconds and 5 git commands to generate.