initallfs() does 2 strdups, but then checks the result
of one of them twice, rather then checking each one.
Fix this.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
fs->dev = strdup(mp->mnt_fsname);
fs->mnt = strdup(mp->mnt_dir);
- if (fs->mnt == NULL || fs->mnt == NULL) {
+ if (fs->dev == NULL) {
fsrprintf(_("strdup(%s) failed\n"), mp->mnt_fsname);
exit(1);
}
+ if (fs->mnt == NULL) {
+ fsrprintf(_("strdup(%s) failed\n"), mp->mnt_dir);
+ exit(1);
+ }
mi++;
fs++;
}